www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/07/19:45:23

From: Randy Hunt <randy DOT hunt AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Getting iostream.h to work
Date: Sun, 07 Jul 2002 19:36:54 -0400
Lines: 36
Message-ID: <3D28D095.720A1DAF@erols.com>
References: <ag9ecs$qj0$1 AT reader01 DOT singnet DOT com DOT sg>
Mime-Version: 1.0
X-Trace: UmFuZG9tSVZ13G05jJmMicTrTNkUfsQMmvQtBYD72vX+7tK1SMPoVbfK3BlaOwZZ
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 7 Jul 2002 23:33:14 GMT
X-Mailer: Mozilla 4.78 [en]C-CCK-MCD {STARPOWER} (Win98; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Origin wrote:

> Hi all,
>
>     I'm using RHIDE 1.4.9. I'm new at C; my only other programming
> experience was with QB, and it didn't involve libraries, objects or the
> like, so please excuse me if what I say here sounds odd.
>
>     After installing DJGPP, I followed a tutorial and typed out a Hello
> World program, using iostream.h as the library, (i.e. #include
> <iostream.h>). However, DJGPP doesn't compile it and tells me 'iostream.h:
> No such file or directory'. I searched around and found iostream.h in the
> lang\cxx-v31\backward directory, so I copied the file over to \include. Now
> it tells me another file, backward_warning.h is not found. I looked at
> iostream.h using a text editor, and saw that it has a #include
> nackward_warning.h line in it, so I figure the libraries link to each other.
> I've tried things like copying the contents of \lang into \include, changing
> the Include directory, but I still keep getting missing file errors. When I
> typed out programs using stdio.h, everything worked fine tho.
>
> How should I set up iostream.h and the associated files so that it works?

I asked the same questions about three weeks ago, and got the following reply
from Andrew Cottrell:

"The C++ standard has changed slightly over the years and to get the program to
compile change the header include and add the namespace line as follows:-

#include <iostream>
using namespace std;"

This works just fine.

Randy Hunt


- Raw text -


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