I get these error messages for all cout
and endl
:
main.cc:17:5: error: ‘cout’ was not declared in this scope
main.cc:17:5: note: sugges
In the C++ standard, cout
is defined in the std
namespace, so you need to either say std::cout
or put
using namespace std;
in your code in order to get at it.
However, this was not always the case, and in the past cout
was just in the global namespace (or, later on, in both global and std
). I would therefore conclude that your classes used an older C++ compiler.