: #include <iostream.h> class Point { public: int x; int y; }; void main() { Point pt; pt.x=5; pt.y=5; cout<<pt.x<<endl<<pt.y<<endl; } 编译错误:
fatal error C1083: 无法打开包括文件:"iostream.h": No such file or directory
解决方法:
#include<iostream.h>
修改为:
#include<iostream>
using namespace std;
原因:
iostream.h是老版编译器的头文件(VC6.0可用),新版本编译器,stl升级了,STL库没有.h扩展名。
fatal error C1083: 无法打开包括文件:"iostream.h": No such file or directory
解决方法:
#include<iostream.h>
修改为:
#include<iostream>
using namespace std;
原因:
iostream.h是老版编译器的头文件(VC6.0可用),新版本编译器,stl升级了,STL库没有.h扩展名。