RE: [Dev-C++] Re: Compiling problems with 4.9.7.0 and GCC 3.2
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2003-01-17 01:58:23
|
-------Original Message-------=0D =0D From: Dany P. Wu=0D Date: Friday, 17 January 2003 3:38:19 AM=0D To: dev...@li...=0D Subject: RE: [Dev-C++] Re: Compiling problems with 4.9.7.0 and GCC 3.2=0D =0D =0D Ok, now that it's solved, there's yet another question.=0D =0D I've been using "endl" as in:=0D =0D Std::cout << "Hello world!" << endl;=0D =0D This is supposed to do a carriage return. Unfortunately I get an error=0D which says:=0D =0D =0D =3D=3D> C++ makes distinction between uppercase and lowercase. The valid = is std, not Std. Also std is a namespace.=0D =0D So you can do:=0D =0D std::cout<<"Hello new world!"<<std::endl;=0D =0D or=0D =0D using namespace std;=0D =0D cout<<"Hello new world!"<<endl;=0D =0D =0D or=0D =0D using std::cout;=0D using std::endl;=0D =0D cout<<"Hello new world!"<<endl;=0D =0D =0D Try to restrict the using statements in as small scopes as possible.=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |