(vs2005)初学时候出现的错误:fatal error C1083

来源:互联网 发布:恢复软件finaldata 编辑:程序博客网 时间:2024/06/05 19:08
 
有初学C++者经常会出现如下错误:

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

这个错误一般在使用Visual C++ .NET 2005或以上版本时出现。

原因,iostream.h为C类库,C++类库中应该为iostream。

另外cin,cout等函数在std命名空间中。使用时应加上using namespace std;

解决方法:将#include <iostream.h>

改为#include <iostream>
using namespace std;
原创粉丝点击