在程序末尾添加语句:system("pause"); 加上这句后,控制台显示运行结果后会显示“请按任意键继续”
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
cout<<sizeof(int)<<endl;
system("pause");
return 0 ;
}