Click to See Complete Forum and Search --> : # include <iostream>
It's been quite a while since I've done any programming in C++, but I am now
using VC++ and just tried to compile my first program in years and I got
the error ...: fatal error C1083: Cannot open include file: 'iostream.h':
No such file or directory...ok, I know this is silly, but what am I not doing,
that it can't find the include file???
jonnin
04-10-2001, 01:53 PM
Er, try
<iostream.h> or <iostream> not "" or ' ' if you did that.
If not, you need to reinstall, did you mess with the default dirs?
"Zada" <dale@DENBURY.COM> wrote:
>
>It's been quite a while since I've done any programming in C++, but I am
now
>using VC++ and just tried to compile my first program in years and I got
>the error ...: fatal error C1083: Cannot open include file: 'iostream.h':
>No such file or directory...ok, I know this is silly, but what am I not
doing,
>that it can't find the include file???
ioslipstream
04-11-2001, 10:29 AM
"Zada" <dale@DENBURY.COM> wrote:
>
>It's been quite a while since I've done any programming in C++, but I am
now
>using VC++ and just tried to compile my first program in years and I got
>the error ...: fatal error C1083: Cannot open include file: 'iostream.h':
>No such file or directory...ok, I know this is silly, but what am I not
doing,
>that it can't find the include file???
There are two ways to do this, first I'll show you the old way:
#include <iostream.h>
That's the old way, here is the "new" way:
#include <iostream>
using namespace std;
Both still work, but the second way is the one you should be using nowadays.
If you typed in just #include <iostream> and didn't tell the compiler you
were using namespace std, then you would get an error because it wouldn't
be able to locate the header file. If you typed in #include <iostream.h>
then you don't need to tell the compiler you are using namespace std, but
you should get used to the second method listed because the first method
is considered out of date, hope that makes sense for you.
devx.com
Copyright Internet.com Inc. All Rights Reserved