delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/08/03:05:53

Date: Fri, 08 Jun 2001 10:00:40 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Sanity in Anarchy" <mysticmass AT hotmail DOT com>
Message-Id: <7458-Fri08Jun2001100040+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <F118dHfKsp3MSi6xzme0000b841@hotmail.com>
(mysticmass AT hotmail DOT com)
Subject: Re: What is ANSI C++?
References: <F118dHfKsp3MSi6xzme0000b841 AT hotmail DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Sanity in Anarchy" <mysticmass AT hotmail DOT com>
> Date: Thu, 07 Jun 2001 21:10:45 -0500
> 
> My problem is this: No matter what I am compiling, I always get these 
> messages about "ANSI C++ forbids this" and "ANSI C++ forbids that" and I 
> don't know what ANSI C++ is.

ANSI C++ is the international standard for the C++ programming
language.  The compiler tells you that some of your code goes against
the standard's definition of the language.

> I also know that, disregarding ANSI, my code is flawless

If the compiler prints warnings, your code isn't flawless.  You should
look carefully at each place in your code which triggers a warning,
and try to understand what's wrong there using the compiler message as
your guide.  If you cannot figure that out, try posting the relevant
code fragments and the messages here.

> and actually worked with previous versions of DJGPP, but now even
> programs that came with the books, and simple things like #include
> <iostream.h> or #include <windows.h> cause my compiler to produce
> nausiating lists of errors

The ANSI C++ standard was released not long time ago, and the latest
versions of C++ compilers only now begin to issue the diagnostics
according to the latest standard version.  This causes many programs
which previously compiled without a hitch to spit warnings.  The same
happens with books: their code was tested with old versions of
compilers which didn't yet support all the ANSI C++ features.

> Should I learn ANSI C++?

Definitely.  You cannot in good faith write C++ in your CV without
being familiar with the standard for that language.

> Are there advantages?

Yes.  Programs which comply to ANSO C++ normally trigger less bugs in
compilers, and are more portable.

> And if not, is there a 
> .zip I forgot to download, or is there something with the name fixincludes 
> staring me in the face?

Forget about fixincludes and -traditional: this is not the right
solution to your problems.

- Raw text -


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