From: "Michael Farnham" Newsgroups: comp.os.msdos.djgpp Subject: std namespace Date: Mon, 10 Jan 2000 22:59:17 -0600 Organization: Prodigy Internet http://www.prodigy.com Lines: 41 Message-ID: <85ecpl$ancc$1@newssvr03-int.news.prodigy.com> NNTP-Posting-Host: dll2a020-0525.splitrock.net X-Trace: newssvr03-int.news.prodigy.com 947566197 3966267 209.254.218.17 (11 Jan 2000 04:49:57 GMT) X-Complaints-To: abuse AT prodigy DOT net NNTP-Posting-Date: 11 Jan 2000 04:49:57 GMT X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I was trying to use the -fhonor-std flag. This does not work the way I expected it to work. The following code compiled, linked, and ran with no errors. #include #include int main(void) { cout << "Hello World" << endl; } The following code did not compile. I got errors that cout and endl are not in the std namespace. #include #include int main(void) { std::cout << "Hello World" << std::endl; } The command line I used to invoke gcc was the same for both programs and was as follows. gpp -Wall -ansi -pedantic -fhonor-std hello.cpp -o hello.exe Am I mistaken in what the -fhonor_std flag is supposed to do? As I understand it all of the C++ header files are supposed to declare everything in the std namespace. Is there a way to make gcc do this? Regards Mike