We are trying to use MS Visual Studio .NET to compile and link example
programs from a C++ book, in console mode, i.e. not MFC . Error message

i s:

c4.cpp(5) : fatal error C1083: Cannot open include file: 'iostream.h':
No such file or directory


The projects and solutions are in
C:\My Documents\Visual Studio Projects


What is problem? solution?


Should we use 'console' application? or Win32? or?


Thanks


e.g. of program :


// ctut3.cpp : Defines the entry point for the console application.
//


#include "stdafx.h"
#include <iostream>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
cout << "Hello World!";
cout << "I'm a C++ program";


return 0;

Re: fatal error C1083: Cannot open include file: 'iostream.h': No such file or by Abdo

Abdo
Thu Apr 13 10:13:18 CDT 2006


"CCDSJ" <ccdsj@yahoo.com> wrote in message
news:1144936543.228316.114880@t31g2000cwb.googlegroups.com...
> We are trying to use MS Visual Studio .NET to compile and link example
> programs from a C++ book, in console mode, i.e. not MFC . Error message
>
> i s:
>
> c4.cpp(5) : fatal error C1083: Cannot open include file: 'iostream.h':
> No such file or directory
Apearantly you are including "iostream.h" a file which doesn't exist... use
<iostream> instead

> Should we use 'console' application? or Win32? or?
Console application, a Win32 application has a WinMain() instead of
main()...

> #include "stdafx.h"
> #include <iostream>
Strange you are including the right file here, does it give you any error

> using namespace std;
>
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> cout << "Hello World!";
> cout << "I'm a C++ program";
>
>
> return 0;
>
}

I noticed that you included the source of c3.cpp while the error is in
ctut3.cpp, any logical reason?

Hope that helped,
--
Abdo Haji-Ali
Programmer
In|Framez



Re: fatal error C1083: Cannot open include file: 'iostream.h': No by Tom

Tom
Thu Apr 13 09:11:24 CDT 2006

CCDSJ wrote:
> We are trying to use MS Visual Studio .NET to compile and link example
> programs from a C++ book, in console mode, i.e. not MFC . Error message
>
> i s:
>
> c4.cpp(5) : fatal error C1083: Cannot open include file: 'iostream.h':
> No such file or directory

Right, there is no header called "iostream.h", though there is one
called "iostream".

>
>
> The projects and solutions are in
> C:\My Documents\Visual Studio Projects
>
>
> What is problem? solution?
>
>
> Should we use 'console' application? or Win32? or?

Console application for console programs.

> Thanks
>
>
> e.g. of program :
>
>
> // ctut3.cpp : Defines the entry point for the console application.
> //
>
>
> #include "stdafx.h"
> #include <iostream>
> using namespace std;
>
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> cout << "Hello World!";
> cout << "I'm a C++ program";
>
>
> return 0;

There's a missing brace here:
}

Since your program doesn't include <iostream.h>, I don't really see how
you got the error.

Tom

Re: fatal error C1083: Cannot open include file: 'iostream.h': No such file or by Marcus

Marcus
Thu Apr 13 09:13:39 CDT 2006

Hi CCDSJ,

"CCDSJ" <ccdsj@yahoo.com> wrote in message
news:1144936543.228316.114880@t31g2000cwb.googlegroups.com...
> We are trying to use MS Visual Studio .NET to compile and link example
> programs from a C++ book, in console mode, i.e. not MFC . Error message
>
> i s:
>
> c4.cpp(5) : fatal error C1083: Cannot open include file: 'iostream.h':
> No such file or directory
>
>
> The projects and solutions are in
> C:\My Documents\Visual Studio Projects
>
>
> What is problem? solution?
>
>
> Should we use 'console' application? or Win32? or?
>
>
> Thanks
>
>
> e.g. of program :
>
>
> // ctut3.cpp : Defines the entry point for the console application.
> //
>
>
> #include "stdafx.h"
> #include <iostream>
> using namespace std;
>
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> cout << "Hello World!";
> cout << "I'm a C++ program";
>
>
> return 0;

iostream.h has been removed from the include directory (I think this has
happened with VS2002).
Use the standard header intead:

#include <iostream>
using namespace std;

Marcus