On 5 Jan 2006 00:17:17 -0800, Chris wrote: > I've been trying to compile some code. When I type the following in > the command line, I get a bunch of errors:
> [EMAIL PROTECTED]:/imports/home/cspears/Documents/C++/myCode/chap04/ex04> > gcc struct.cpp test.cpp You need to use g++, not gcc, when compiling C++ programs. > However, when I type g++, everything works well: Correct. > [EMAIL PROTECTED]:/imports/home/cspears/Documents/C++/myCode/chap04/ex04> > g++ struct.cpp test.cpp > [EMAIL PROTECTED]:/imports/home/cspears/Documents/C++/myCode/chap04/ex04> > ls > a.out struct.cpp struct.cpp~ struct.h struct.h~ test.cpp > test.cpp~ > [EMAIL PROTECTED]:/imports/home/cspears/Documents/C++/myCode/chap04/ex04> > ./a.out > 5 > Why is this? I thought g++ and gcc were the same. The program may be the same, but that doesn't mean the program can't look at the name that was used to invoke it and process things accordingly. -- Dave Seaman U.S. Court of Appeals to review three issues concerning case of Mumia Abu-Jamal. <http://www.mumia2000.org/> _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus