Message-ID: <3EC5615B.6000704@earthlink.net> From: Martin Ambuhl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en, de, fr, ru, el, zh MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Trouble Compiling C++ with DJGPP References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 32 Date: Fri, 16 May 2003 22:09:03 GMT NNTP-Posting-Host: 65.145.36.16 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread2.prod.itd.earthlink.net 1053122943 65.145.36.16 (Fri, 16 May 2003 15:09:03 PDT) NNTP-Posting-Date: Fri, 16 May 2003 15:09:03 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Anthony wrote: > --Snippet-- > #include > > int main() > { > cout << "Hello world.\n"; > return(0); > } > ----------- > > --Error-- > hello.cc: In function 'int main()': > hello.cc:5: 'cout' undeclared (first use this function) > hello.cc:5: (each identifier reported only once) > --------- [Description of much wasted effort] cout is part of the std namespace in C++. You must say so, in any implementation of the real language C++, including g++. One way of doing so is: #include int main() { std::cout << "Hello world.\n"; return 0; }