Mail Archives: djgpp/2001/03/03/16:36:33
From: | "Brian Christiansen" <brianc23454 AT earthlink DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
References: | <3AA06D35 DOT 649C4A27 AT optonline DOT net>
|
Subject: | Re: Having a problem w/sorce codes
|
Lines: | 27
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400
|
Message-ID: | <Tqdo6.11671$%4.1283499@newsread1.prod.itd.earthlink.net>
|
Date: | Sat, 03 Mar 2001 21:33:39 GMT
|
NNTP-Posting-Host: | 63.23.228.25
|
X-Complaints-To: | abuse AT earthlink DOT net
|
X-Trace: | newsread1.prod.itd.earthlink.net 983655219 63.23.228.25 (Sat, 03 Mar 2001 13:33:39 PST)
|
NNTP-Posting-Date: | Sat, 03 Mar 2001 13:33:39 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
|
"R B" <reabee71 AT optonline DOT net> wrote in message
news:3AA06D35 DOT 649C4A27 AT optonline DOT net...
Dear Sir,
I have installed a C++ program from this book called C++ in 24hr.
which reconize borland compliers, etc.,etc.
However when I started the "Hello World" program I kept getting this error
message in line 5.
This is how I designed the program:
1. #include <iostream.h>
Should be :
#include <iostream>
2.
3. int main()
4. {
5. cout << 'Hello World! /n';
Stings are delimeted by ", not ', so this should be:
cout << "Hello World! \n";
6. return o;
Main is defined to return an int, not a char, so this should be:
return 0;
7. }
(oh, by the way, don't post in HTML - my newsreader understands it, and I
almost replied using it because that is what it is set to automatically do,
but a lot of people's don't.)
Brian Christiansen
- Raw text -