[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
problem in running simple c++ programs.....
Greetings,
I had created a simple program :
/*Program Start*/
#include <iostream.h>
void main()
{
cout<<"Testing";
}
/*Program End*/
But on doing
cc <filename>.cpp
I get the following error :
/tmp/cevuIjst.o:In function main
/tmp/cevuIjst.o(.text+0x9):undefined reference to 'cout'
/tmp/cevuIjst.o(.text+0xe):undefined reference to 'ostream::operator<<(char
cost *)'
collect 2: Id returned 1 exit status
There is no problem in running c programs. Also the above error does not
change, whether I am logged in as root or as normal user.