delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/22/19:11:29

Newsgroups: comp.os.msdos.djgpp
Subject: Re: Question about the latest GNU C++
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
References: <20030722191204 DOT 5818 DOT qmail AT web20001 DOT mail DOT yahoo DOT com>
Organization: Nocturnal Aviation
Message-ID: <Xns93C0B1F41F24Bmambuhlearthlinknet@207.217.77.25>
User-Agent: Xnews/5.04.25
X-Face: #PT?r&aN>ro*?:r AT h&l1(3WchlNz?9-y/wnr]CjPxdjd/*4lVC\*M+aZLO?E!2Q)]vD*M8oL(Zu2:VR17$t7-eVdNQH'!xp'5'NAP4$\fb"zAcf60HTC%S!<~xD}TFE76>a)IF-xa%$2at+D^;7~$mW^aDR)]bBmO``s<c=AN_wKI(G1PX/L02Q~BX<O}T<@916W22JYTnlp`C:a~[$WAdF9XpX'x!3jFgPK&*O6'^%RkX-C`F$7A7^}V$.K=
Lines: 49
Date: Tue, 22 Jul 2003 22:29:57 GMT
NNTP-Posting-Host: 65.148.5.82
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread2.prod.itd.earthlink.net 1058912997 65.148.5.82 (Tue, 22 Jul 2003 15:29:57 PDT)
NNTP-Posting-Date: Tue, 22 Jul 2003 15:29:57 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Bill Gerics <gericsb AT yahoo DOT com> wrote (22 Jul 2003) in
news:20030722191204 DOT 5818 DOT qmail AT web20001 DOT mail DOT yahoo DOT com /
comp.os.msdos.djgpp: 

> Hello,
>  
> I have downloaded the latest GNU C++ and noticed some major
> changes. 
>  
> 1) Header files no longer have the .h extension

That's because the C++ language is defined to have headers without
'.h'.  It is a good idea for something claiming to be a C++ compiler
to support the actual C++ language. 
>  
> 2) cin, cout and cerr are no longer supported by the iostream
> library. I must modify my calls to these functions to std::cin,
> std::cout etc-- 

That's because the C++ language is defined to have those in the std
namespace, and requires them either to be explicitly qualified or
implicitly through the use of a 'using' statement.  It is a good
idea for something claiming to be a C++ compiler to support the
actual C++ language. 
  
>  
> Why are these changes made that make my code no longer backwards
> compatible and is there anything I can do to my existing programs
> to get them to compile short of making the changes mentioned
> above.  

Change your code to actually be C++ instead of whatever you wrote 
before.

> It would seem that these cj=hanges have made existing C++
> literature and examples obsolete. 

Only that literature and examples that didn't conform to the 
standard, which was stable by 1997 and adopted in 1998.

And don't post html or attachments to newsgroups.




-- 
Martin Ambuhl
Returning soon to the
Fourth Largest City in America

- Raw text -


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