delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/08/14:00:37

From: "Borg_Cinder" <sinder AT cardina DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: cout + latest version?
Date: Mon, 8 Nov 1999 11:20:20 -0500
Organization: http://extra.newsguy.com
Lines: 50
Message-ID: <806t6a$1u3i@enews4.newsguy.com>
References: <3823718F DOT 51A3 AT tin DOT it> <800emi$10iv AT enews3 DOT newsguy DOT com> <805uff$b44$1 AT news DOT doit DOT wisc DOT edu>
NNTP-Posting-Host: p-868.newsdawg.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

You gotta be kidding me!  That's basically "Hello World" down there...

----------------------------------------------------------------------

#include <iostream>        /* don't need the .h part */
int main()                 /* could use void, but no difference */
{                                /* um, it's a bracket */
    cout << "Hello World!\n";    /* Hello to you too! */
    return 0;                    /* program terminates normally */
}                                /* hey it's another bracket! yea! */

----------------------------------------------------------------------

Now if that don't compile in DJGPP or VC++ or Borland, then we got some
serious problems....



Mumit Khan <khan AT xraylith DOT wisc DOT edu> wrote in message
news:805uff$b44$1 AT news DOT doit DOT wisc DOT edu...
> In article <800emi$10iv AT enews3 DOT newsguy DOT com>,
> Borg_Cinder <sinder AT cardina DOT net> wrote:
> >Of course it is.  DJGPP is absolutely ANSI C++ compliant.  Cout works
just
> >as it should.
> >
> >#include <iostream>
> >int main()
> >{
> >    cout << "Yep cout still works!\n";
> >    return 0;
> >}
>
> GNU C++ compiler is still a long way from ANSI/ISO compliance, sorry.
> The compiler itself is getting close, but the runtime is not even close
> (see http://sourceware.cygnus.com/libstdc++/ for libstdc++-v3 project
> that will be ISO compliant).
>
> Contrary to the marketing hype you may hear, there is no compiler that
> conforms 100% to the standard yet
>
> Your code snippet from example will not even compile with an ISO
> compliant C++ compiler (hint: either prefix with std:: or import
> all of std with `using namespace std;'.)
>
> Regards,
> Mumit
>


- Raw text -


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