在VS.NET 2008新建了一个win 32项目,引用以下头文件
#include "stdafx.h"
#include<iostream.h>
编译出错:fatal error C1083: 无法打开包含文件:“iostream.h”: No such file or directory
我以为是头文件前后顺序不对,但测试后发现不是这个原因。
后来上网调查说我没有引用命名空间,修改后
#include "stdafx.h"
#include<iostream.h>
using namespace std;
还是出同样的错误,后来发现还需要把#include<iostream.h>改为#include<iostream>。
因此正确的是:
#include "stdafx.h"
#include<iostream>
using namespace std;
本文介绍了在VS.NET2008环境下创建win32项目时遇到的编译错误:无法打开包含文件“iostream.h”。通过调整头文件引用方式及使用正确的命名空间,最终解决了此问题。
7074

被折叠的 条评论
为什么被折叠?



