If you don't have hello.cpp, you can click on this link hello.cpp and manage to get a copy for yourself.
Once you are on Hercules, the command to compile your C++ program is CAPITAL CC
Here is an example of compiling a program named hello.cpp, using
CC hello.cpp -o helloto compile and then using
helloto run the program.
If you complile it using
CC hello.cppthen Run the program by typing
|CC||UNIX is case sensitive, capital CC is a C++ compiler command.|
|hello.cpp||Your C++ program name|
|-o hello||The "-o" is used to create an executable file as specifiled by the name following -o. When you don't use "-o", the executable filename will be called a.out.|
Copyright: Department of Computer Science, University of Regina.