The life of a C++ programmer can be easy when the correct compiler flags are used: the good stuff: -ansi switch to the current standard (-std=c++98.) -pedantic reject non-iso code -Weffc++ Warn about style guidelines from Scott Meyers’ Effective C++ book -g produce debugging info -ggdb -||- for gdb -Wall give more warnings -Wextra and even more the bad stuff: -DNAME to define the macro NAME the ugly stuff: (needed when bad stuff happens) -E look at what the precompiler does -dD Output the #defines too (together with -E) -dM Output predefined macros (-||-)