www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/02/23:15:14

From: mceeras AT akula DOT com (Deez Nutz)
Newsgroups: comp.os.msdos.djgpp
Subject: "HELLO WORLD!" C++ Programming Error with Djgpp?
Date: Mon, 03 Feb 1997 02:55:06 GMT
Organization: Akula Communications Corp.
Lines: 27
Message-ID: <32f55207.1140784@news.akula.com>
NNTP-Posting-Host: dialup-36.pr1.akula.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am starting on learning C++ using DJGPP and I am having problems.  I
have downloaded the lgp and gpp files for C++ and I have had previous
success in running simple programs like "Hello World!" In C
previously.  However, In reading a book entitled "C++ Programming 101"
by Sams Publishing, I have not been succesful in do such simple
programs in c++:

This is the following C++ syntax that I type:

// Filename hello.cpp Displays Message
#include<iostream.h>
void main()
{
	cout << "Hello World!";
}

I then compile as so:

C:\>gcc hello.cpp -o hello


I then get an error regarding the main function. I cant recall what
exactly the error is but If someone can help I would appreciate it.
Thank You.



- Raw text -


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