C++ 运行"hello world" vs2010 时出错
C++ error runing "hello world", vs2010
#include <iostream>
using namespace std;
int main()
{
cout<<"hello world!"<<endl;
return 0;
}
我正在尝试在 vs2010 中运行这个最简单的代码,但在编译它时收到了 100 多个错误。
f:vs2010vcincludefstream(14): error C2143: syntax error : missing ';' before '*'
f:vs2010vcincludefstream(14): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:vs2010vcincludefstream(16): error C2653: 'ios_base' : is not a class or namespace name
f:vs2010vcincludefstream(16): error C2061: syntax error : identifier 'openmode'
f:vs2010vcincludefstream(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
像这样的错误。我该怎么办?
尝试将此练习包含在代码中
#include "stdafx.h"
相关文章:
- 访问者访问变体并返回不同类型时出错
- 在Linux for Windows上编译C++代码时出错
- 读取文件的最后一行并输入到链接列表时出错
- 重载操作程序时出错>>用于类中的字符串 memebr
- 在VS2010-VS2015下编译时,如何使用decltype作为较大类型表达式的LHS
- 调用专用模板时出错"no matching function for call to [...]"
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- LINK 尝试使用 OpenSSL evp aes 256 c++ 时出错
- 在Google Kick start中提交时出错
- 在c++中访问int到类对象的映射时出错
- 分段错误当我试图运行程序时出错
- 使用dynamic_cast和构造函数时出错
- CHECK(调用)函数在Google Colab中出错
- 将VC++项目从VS2010升级到VS2012时出错
- 在VS2010上构建openssl时出错
- VS2010在尝试编译基本JNI测试代码时出错
- C++ 运行"hello world" vs2010 时出错
- 使用变量参数列表为传递的引用赋值(VS2010中出错)
- 为VS2010、WINDOWS7、64BIT生成CUDA示例时出错MSB3721
- 在Windows VS2010上构建NaoQI C++SDK示例项目helloworld时出错