我的CMD窗口快出了 [英] my CMD windows goes out that Fast
本文介绍了我的CMD窗口快出了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,请帮帮我,我只想知道为什么窗户打开并消失得如此之快,以致我看不到屏幕上的内容是什么?
hello Please help me out , i just wanna know why the windows open and desappear that fast with out me to see what is on the screen ?
#include <iostream>
int main ()
{
int x =5;
int y =7;
std::cout << "\n";
std::cout << x+y << " "<< x * y;
std::cout << "\n";
return 0;
}
推荐答案
只需像这样更改代码:
Hi,
Just change your code like this:
#include <iostream>
int main ()
{
......
// Add this line to hold the screen
getchar();
// Or you can use this instead of the above line
std::cin.get();
return 0;
}
问候
Regards
这篇关于我的CMD窗口快出了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文