主题:新手请教一个基础的C++问题
在vs2005中写了一段代码
#include <iostream>
int main()
{
std::cout<< "enter two numbers:" << std::endl;
int v1,v2;
std::cin>> v1 >> v2;
std::cout<< "the sum of" <<v1<<"and"<< v2 <<"is "<<std::endl << v1+v2<<std::endl;
return 0;
}
运行时一出结果窗口接着就关闭了,请问有什么办法能不让它关闭吗?
#include <iostream>
int main()
{
std::cout<< "enter two numbers:" << std::endl;
int v1,v2;
std::cin>> v1 >> v2;
std::cout<< "the sum of" <<v1<<"and"<< v2 <<"is "<<std::endl << v1+v2<<std::endl;
return 0;
}
运行时一出结果窗口接着就关闭了,请问有什么办法能不让它关闭吗?