第一次用VS2010 不知道怎么用 HelloWorld都运行不了
我首先 新建了一个项目 然后选的是WIN32控制台应用
之后自己 新建了一个
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
我改成了
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
std::cout<<"HelloC++!\n";
return 0;
}
然后 我点测试 运行
最后出来的是 未将对象引用设置到对象的实例
我该怎么弄
[解决办法]
#include "stdafx.h"
#include <iostream>
[解决办法]
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
这个不动,在下面重新写代码,包括头文件
[解决办法]
#include "stdafx.h"#include <iostream>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ cout<<"HelloC++!\n"; return 0;}