December 2015
Intermediate to advanced
480 pages
14h 45m
English
In this chapter, we introduce some basic programming tools that can help us to achieve our programming goals.
One of the most popular C++ compilers is g++, the C++ version of the C compiler gcc. The acronym used to stand for Gnu C Compiler, but the compiler supports several other languages (Fortran, D, Ada, . . .) and the name was changed to Gnu Compiler Collection while keeping the acronym. This section gives a short introduction to how to use it.
The following command:
g++ -o hello hello.cpp
compiles the C++ source file hello.cpp into the executable hello. The flag -o can be omitted. Then the executable will be named a.out (for bizarre historical reasons as an abbreviation of “assembler output”). As soon ...