delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/08/20:45:44

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Trivial question...
Date: Fri, 08 May 1998 19:50:28 -0400
Organization: Two pounds of chaos and a pinch of salt.
Lines: 34
Message-ID: <35539A44.68C@cs.com>
References: <355304B1 DOT 3536D469 AT writeme DOT com>
NNTP-Posting-Host: ppp121.cs.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Flavio Poletti wrote:
> 
> Please, how I can compile this simple C++ program?
> 
> (the file is called cout.cc)
> 
> #include <iostream.h>
> void main (void)
> {
>     cout<<"Hello world!";
> }
> 
> I've tried all ways, there must be something wrong in me!

void is an illegal return type for main().  However, compiling C++
programs is simple:  use 'gpp' instead of 'gcc' (assuming you installed
gcc 2.8.0).  Also, make sure:

 - You have installed the C++ packages (gpp280b.zip, lgpp280b.zip)
 - You have set up your DJGPP environment correctly
 - You can compile C programs
 - You have fully read the instructions in 'readme.1st'

hth!

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>  UIN# 7406319

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? C++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


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