#include <iostream>
using namespace std;
int main()
{
cout<<"hello world!"<<endl;
return 0;
}
我正在尝试在vs2010中运行这个最简单的代码,但在编译时我收到了100多个错误。
f:\vs2010\vc\include\fstream(14): error C2143: syntax error : missing ';' before '*'
f:\vs2010\vc\include\fstream(14): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vs2010\vc\include\fstream(16): error C2653: 'ios_base' : is not a class or namespace name
f:\vs2010\vc\include\fstream(16): error C2061: syntax error : identifier 'openmode'
f:\vs2010\vc\include\fstream(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
这些错误。我该怎么办?
答案 0 :(得分:-2)
尝试在您的代码中包含此实验
#include "stdafx.h"