Date: Fri, 08 Jun 2001 10:00:40 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Sanity in Anarchy" 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: (mysticmass AT hotmail DOT com) Subject: Re: What is ANSI C++? References: 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 Precedence: bulk > From: "Sanity in Anarchy" > 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 > or #include 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.