Program Compilation
Compilation and execution of a C++ program depends on the platform or operating system. The following description refers to command-line compilation and execution on UNIX based systems using the GNU family of compilers. Compiling and LinkingCreating an executable C++ program involves both compilation and linking. For simple programs consisting of a single source file, the compilation and linking can be combined with the following command (assuming the source file is in the current working directory) g++ -o mypgm mypgm.cc The
ExecutionIf you the program to be executed is in the current working directory, then simply enter the following, where ./mypgm
|