Mail Archives: djgpp/1999/11/08/14:00:37
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 -