Mail Archives: djgpp/2002/07/07/19:45:23
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 -