The Book "Teach yourself c++ in 24 hours" by Jesse Liberty presents a good introduction to c++. We have purchased more than 40 copies of this book for the library and for the use of Fermilab CDF physicists. About 15 copies are available for long term (6 month) loan.
This web page provide support on how to use the examples in this book, as well as other useful information.
This is for compiling and linking simple few-line programs in cdfsga (probably works for fcdfsgi2 also-let me know if it fails) that you wish to test. Note that none of the CDF run 2 computing library will be included --If you wish to use the run 2 software packages, see the computing web page.
We assume that you are using cdfsga.
For KAI c++ compiler, to compile/link a file my_test.cc into an executable
my_test, do :
source ~cdfsoft/cdf2.cshrc
setup cdfsoft2 development
setup kai
KCC -g +K0 -O0 my_test.cc -o my_test
note that if you need the math library, you should add -lm just before the -o in the last line (....my_test.cc -lm -o my_test)
To run the program my_test, just type in "my_test". Note that some program would require parameters (i.e., numbers after the program name before typing in "Return".
Several dozens of simple c++ programs (5 to 50 lines) are in the area /home/lv48/johny/cc --though there aren't enough comments. You are welcomed to copy it into your own area and play with them. Enjoy.
Anyone have any problems ?? By the way, we have 2 copies of the "Teach yourself c++ for Linux in 21 days" book by the same author. It comes with a cdrom that has a distribution of Mandrake Linus 6.1, full development environment GNU c/c++ (egcs) compiler, XDB GNU debugger, GNU make, GTK+, KDE, GNOME, and much more. This books is also available for loan for intermediate c++ programmers --note that this book is published in 4/2000, so some of the software is no doubt outdated
Unfortunately, there's apparantly some problem using the DJGPP compiler that comes in the cdrom. If anyone has found a way to get around that, please write a blurb here (apparantly a library is missing).
In the meantime, if you have visual c++, that works fine.