Undefined reference to `std::cout'
You may get the error "undefined reference to `std::cout'" while compiling C++ program in Linux/Ubuntu.
In order to resolve the error check:
- Have you included the iostream header file in your program. If no then include "iostream" in the code. OR
- Are you trying to compile c++ program using gcc command. You should compile C++ program using g++ such as: $ g++ test.cpp