Hello World Program

R

rhle.freak

#include<iostream>
int main(void)
{
std::cout << "Hello World" << std::<<endl;
return 0;
}


I am compiling it on my linux box (rhel 5) using g++ hello.cpp -o
hello.o and
to my astonishment i am getting the following errors!

hello.cpp: In function 'int main()':
hello.cpp:5: error: expected unqualified-id before '<<' token
hello.cpp:5: error: 'endl' was not declared in this scope


It does look to be a very stupid question ,please pardon me for my
ignorance
in using Linux n g++ .Kindly help me out..
 
R

rhle.freak

#include<iostream>
int main(void)
{
std::cout << "Hello World" << std::<<endl;
return 0;

}
it should have been <<std::endl;
My fault..Please ignore the message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top