I was trying to run following code in eclipse in ubuntu 12.04 but It keeps giving me error. could you please tell me why this is happening ? Thanks.
#include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; } Symbol 'std' could not be resolved Symbol 'cout' could not be resolved Symbol 'endl' could not be resolved
g++ -o myprog myprog.cpp(where myprog.cpp is the name of the source file you posted).