Appendix B

Programming Tools

“Never underestimate the power of a simple tool.”

—Craig Bruce

In this appendix, we introduce some basic programming tools that can help us achieve our programming goals.

B.1 g++

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 ...

Get Discovering Modern C++, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.