delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/01/00:05:34

From: myknees AT aol DOT com (Myknees)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Object Oriented C++ and djgpp
Lines: 49
NNTP-Posting-Host: ladder01.news.aol.com
X-Admin: news AT aol DOT com
Date: 01 Oct 1998 04:00:10 GMT
References: <36106661 DOT CAEE9F7B AT cartsys DOT com>
Organization: AOL http://www.aol.com
X-Newsreader: AOL Offline Reader
Message-ID: <19981001000010.06325.00001348@ngol02.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <36106661 DOT CAEE9F7B AT cartsys DOT com>, Nate Eldredge <nate AT cartsys DOT com>
writes:

>Dupheraire wrote:
>> 
>> I just purchased a book on Object Oriented C++ that was written for Borland
>C++
>> 4.5 and Turbo C++.  When I had programmed with C before the programs had
>> compiled and ran fine.  I copied this simple program from the book:
>> #include <iostream.h>           //(Had to change to stdio.h, which is
>probably
>> the                                               //problem...)

There's a stray "the" that isn't commented.

>> voic main()

...and "void" is misspelled "voic".  In ANSI C and C++, main must return an
integer.  But other than that the program works fine in djgpp:
C:\ELC\src\cc  .gxx -Wall Dupheraire.cc

C:\ELC\src\cc  .a
yadda yadda yadda
C:\ELC\src\cc  .cat Dupheraire.cc
#include        <iostream.h>

int main()
       {
       cout << "yadda yadda yadda";
       }

C:\ELC\src\cc  .



>>       {
>>       cout << "yadda yadda yadda";
>>       }
>> Do I need to find a library with the iostream header file, or do I just
>need to
>> dig up some cash and buy Borland C++?  If the library is a available will
>> someone please
>> direct me to it?  Thanks.
>
>If you installed the C++ package, you should have it.  The file is
>gpp281b.zip.  Remember to compile with `gpp' or you'll have more
>troubles.

- Raw text -


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