delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/09/17:00:48

Message-ID: <36C0A7BD.4C565EA1@devnull.com>
Date: Tue, 09 Feb 1999 13:25:17 -0800
From: Kagenin <kagenin AT devnull DOT com>
Organization: ShadowTek Software
X-Mailer: Mozilla 4.5 [en] (Win95; U)
X-Accept-Language: en,de
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: using namespace std; does not work???
References: <79q39s$e3q AT bgtnsc03 DOT worldnet DOT att DOT net>
NNTP-Posting-Host: 208.25.61.202
X-NNTP-Posting-Host: 208.25.61.202
X-Trace: 9 Feb 1999 21:57:22 -0800, 208.25.61.202
Lines: 42
X-NNTP-Posting-Host: 209.63.224.240
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

That's cause gcc 2.8.1 doesn't support namespaces yet.  Since DJGPP is a
port of GCC, DJGPP doesn't support namespaces...
but on another note....

Camilo wrote:
> 
> Hi,
> 
> I use djgpp to check my code for ANSI C++ compliance. However "using
> namespaces" does not apparently work. Am I right?
> 
> #include <fstream>
> #include <iostream>

you need to put the using keyword about here.
And fstream already #include's iostream, so you don't need to #include
it again

> 
> int main(){
>  using namespace std;   //<-- does not work???

You don't put the using keword here.

>  cout << "  using namespace std does work! \r\n";    // std::cout << "  does
> work anyway \r\n";
>  return(0);
> }
> Thank you
> Camilo

-- 
"When the Going gets Weird, The Weird turn Pro."
Hunter S. Thompson

The above email addy is a spam magnet,
working better than I'd like it to.
If you wish to respond via email, I can
be reached at kagenin at cyberspace dot org

ICQ #25225491
AIM ID Kagenin Z

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019