按 Ctrl + F5 运行,程序结束后会让你按任意键继续;
或者在程序的末尾加一句:
system("pause");
Ctrl + F5或者在main()函数return前 加一条语句 system("pause");