It seems like in Ubuntu 18.04, the default shipped g++ (version 7.3.0) runs in C++11 compatible mode by default. I am getting some errors in my old codes which are not C++11 compatible. I installed g++-6 (version 6.4.0) and the programs are compiling fine. Is it possible to disable C++11 mode in g++-7?
Try adding
-std=gnu++98
, it was probably the default for gcc 6.4.0.Example:
From the
man g++
you can select between different dialects: