From: Alexey Zakhlestine Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie: C++ compiling Date: Thu, 02 Dec 1999 14:42:08 +0300 Organization: MTU-Intel ISP Lines: 38 Message-ID: <38465B10.FF845E15@gs707.com> References: <3845cd1a DOT 0 AT news2 DOT tm DOT net DOT my> <38464cda DOT 0 AT news DOT tm DOT net DOT my> NNTP-Posting-Host: dial53103.mtu-net.ru Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Trace: gavrilo.mtu.ru 944134929 47924 195.34.53.103 (2 Dec 1999 11:42:09 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 2 Dec 1999 11:42:09 GMT X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com try using "cout <<" instead of "std::cout <<" Chiew Heng Wah wrote: > Thanks for the correction. But now the error message becomes like this. > I don't know what my mistake is. > > =====Error Message 1===== > hello.cpp: In function `int main()': > hello.cpp:5: `std' undeclared (first use this function) > hello.cpp:5: (Each undeclared identifier is reported only once > hello.cpp:5: for each function it appears in.) > hello.cpp:5: parse error before `::' > > =====Source Code 1===== > #include > > int main() > { > std::cout << "Hello, World\n"; > return 0; > } > > =====Error Message 2===== > c:/djgpp/tmp\ccdaaaaa(.text+0x1e):hello.cc: undefined reference to `cout' > c:/djgpp/tmp\ccdaaaaa(.text+0x23):hello.cc: undefined reference to > `ostream::ope > rator<<(char const *)' > > =====Source Code 2===== > #include > > int main() > { > cout << "Hello, World\n"; > return 0; > }