有初学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>

 

 

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

BaseClasses\ctlutil.h(278) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

错误发生在:operator=(LONG); 函数定义中,这是因为在VC6中,如果没有显示的指定返回值类型,编译器将其视为默认整型;但是vs2005不支持默认整型. 这个错误,解决方法如下:
打开project->BaseClasses properties->configuration->C/C++ ->Command Line,增加/wd4430选项。

posted on 2010-05-28 15:50  Siylzヾ夏天  阅读(3145)  评论(0编辑  收藏  举报