delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/03/23/20:01:18

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: I cannot compile the simplest program
References: <3WBUf.4318$tN3 DOT 1538 AT newssvr27 DOT news DOT prodigy DOT net>
In-Reply-To: <3WBUf.4318$tN3.1538@newssvr27.news.prodigy.net>
Lines: 27
Message-ID: <ajHUf.9611$k75.9488@newsread3.news.atl.earthlink.net>
Date: Fri, 24 Mar 2006 00:45:58 GMT
NNTP-Posting-Host: 165.247.43.101
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread3.news.atl.earthlink.net 1143161158 165.247.43.101 (Thu, 23 Mar 2006 16:45:58 PST)
NNTP-Posting-Date: Thu, 23 Mar 2006 16:45:58 PST
Organization: EarthLink Inc. -- http://www.EarthLink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Harry J.Smith wrote:
> 
> I installed djgpp but I cannot compile the simplest program:
> 
> #include <stdio.h>
> int main(void)
> {
>  cout << "Hello World\n";
>  return 0;
> }

When you have a compilation problem, do *not* assume the problem is with 
the implementation.  Start by considering whether your program is in 
error.  And it is:
#if 0
#include <stdio.h>              /* incorrect header */
#endif

#include <iostream>             /* correct header */
using namespace std;            /* you could qualify std::cout
                                    correctly instead. */

int main(void)
{
     cout << "Hello World" << endl;
     return 0;
}

- Raw text -


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