C++编译的问题
楼主写了一个小程序,用的是eclipse,开始用的是默认的标准(估计是c++98),但编译的时候出现无法识别auto的错误,于是就在project<properties中将标准改成了c++11,之后编译时程序本身没有出现错误,但eclipse提示“Errors in workplace : Errors exist in the active configuration of project "class.c" ,Proceed with launch”,点击proceed之后eclipse的console可以输出正确的结果,但problem 窗口却出现
'__gnu_cxx::_Exit' has not been declared class.c line 243, external location: d:\eclipse\mingw\lib\gcc\mingw32\4.9.3\include\c++\cstdlib C/C++ Problem ’
的问题,共有100个这种错误,虽然程序可以正常输出,但看到这么多错误总是不爽,哪位大神知道这是什么原因,应该怎么解决这个问题?
下面是我写的小程序
#include <iostream>
//#include <cmath>
#include <vector>
using namespace std;
int main()
{
vector<int> vec={0,1,2,3,4,5,6,7,8,9};
for(auto r_iter = vec.crbegin();
r_iter != vec.crend();
++r_iter)
cout << *r_iter << endl;
return 0;
}