Thread: c++ g++ in 10.04 lucid
i'm trying learn basic c++, can't hello, world! work. here's i'm entering in gedit (or whatever it's called):
#include <iostream>
int main ()
{|
cout << "hello, world!";
return 0;
}
, here's when enter g++ hello.cpp -o test in terminal:
hello.cpp:4: error: expected primary-expression before ‘|’ token
hello.cpp:5: error: ‘cout’ not declared in scope
doing wrong? suggestions on how make work? i've followed few different guides on how this, and, no matter what, first error. (the second 1 new.) please halp!
edit: of other ones i've tried include colons , mysterious lower case l, can't find templates now.
what says - g++ expects before | sign, why there? std::cout if havent specified namespace (using namespace std)
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] c++ g++ in 10.04 lucid
Ubuntu
Comments
Post a Comment