www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/25/05:15:51

From: Boon van der RJ <rjvdboon AT sloep03 DOT cs DOT vu DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ok finaly it works ..... but
Date: 25 Sep 1998 09:01:20 GMT
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Lines: 32
Message-ID: <6ufm50$3q8$1@star.cs.vu.nl>
References: <000b01bde812$24fa9820$a6eea1cd AT joe>
NNTP-Posting-Host: sloep03.cs.vu.nl
User-Agent: tin/pre-1.4-980730 (UNIX) (SunOS/5.5.1 (sun4u))
Originator: rjvdboon AT sloep03 DOT cs DOT vu DOT nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

water <water AT mfi DOT net> wrote:
> ok finaly it works but now when i use the program. 
> i have to type 
> #include <iostream.h> // necessary for cin and cout commands
> now it will not let me use <iostream.h> it says no file name found
> how do i fix that ?

Name your c++ files .cc (.cpp will also work, IIRC, but it isn't
recommended, read the info-files of gcc) and compile them with
gxx/g++/gpp

For example hello.cc:
#include <iostream.h>
int main() {
    cout << "Hallo, this is simple, ain't it" << endl;
    return 0;
}
could be compiled with:
gxx -o hello.exe hello.cc

If this doesn;t work, post the output of the compilation (add -v to
the commandline of gxx/g++/gpp for extra information needed to debug
your problem).

This all is also in the FAQ, sections 8.4 and 8.7, always usefull to
read (it's in v2/faq211b.zip on simtel).

hth,
 Robert.
-- 
rjvdboon AT cs DOT vu DOT nl        | "En dat is niet waar!" sprak ex-Staatsecretaris-
www.cs.vu.nl/~rjvdboon   |    van-Onderwijs Netelenbos fel.

- Raw text -


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