问题描述
我试图在C ++中编译一个简单的VS程序作为类的赋值。我们只会包含并且我一直收到这个错误:
I am trying to compile a simple VS program in C++ as an assignment for class. We only ever include and I keep getting this error:
$ b b
我的程序确实是这个小...
My program is literally this small...
#include <iostream>
using namespace std;
int main()
{
unsigned int day = 30;
cout << "My Name is John Doe" << endl;
cout << "My Major is CS" << endl;
cout << "I was born on day " << day << endl;
return 0;
}
我刚刚安装了Visual Studio Express 2010.真的我想开始一个空项目,而不是安装所有这些文件预定义,我认为这将使它更容易,但我从来没有得到这个选项,当创建一个项目。
I just installed Visual Studio Express 2010. Really I would love to start an empty project instead of installing with all these files predefined, I think it would make it a lot easier but I never get that option when creating a project. Anybody have any suggestions?
推荐答案
您可以随时在项目设置中禁用预编译的标题。
You can always disable the use of pre-compiled headers in the project settings.
VS 2010的说明(对于VS的其他版本应类似):
Instructions for VS 2010 (should be similar for other versions of VS):
如果您只想为简单的C ++命令行程序设置一个最小的Visual Studio项目(如在介绍性C ++编程类中开发的),您可以创建。
这篇关于如何避免预编译头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!