web analytics

fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory

Options

davegate 143 - 921
@2016-01-07 15:10:51

I migrate a simple c++ project to Visual Studio 2013 and compile, and the following compiler error is shown:

fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory....

 I checked the source file, it starts with the following include rows:

#include "stdafx.h"

#inlucde "windows.h"
#include <iostream.h>

....
@2016-01-07 15:15:54

Make the following changes then pass compilation:

#include "stdafx.h"

#inlucde "windows.h"
#include <iostream>

using namespace std;
...

For Visual Studio 2013, the file iostream instead of iostream.h, is normally stored in the C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include folder. Right click on Project and then select Propertis, choose VC++ Directories, make sure $(VS_IncludePath) is in "Include Directories".

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com