64,648
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
int main()
{
//std:: count << "abced" << endl;
std::cout << "Enter two numbers: " << std::endl;
int v1,v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1+v2 << std::endl;
return 0;
}
#include "stdafx.h"//你建个空控制台工程怎么会有这个头文件
#include <iostream>
using namespace std;
int main()
{
cout << "Hello_World" << endl;
return 0;
}
楼主你直接用这个试还有问题就是编译器的问题了
// hello.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
//std:: count << "abced" << endl;
std::cout << "Enter two numbers: " << std::endl;
int v1,v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1+v2 << std::endl;
return 0;
}