作者wearebest (巫醫 阿貝斯特)
看板C_and_CPP
標題[問題] c++ 2008 express的問題
時間Thu May 7 01:01:03 2009
我想請問一下
為什麼 當我編譯完的時候
編譯完後的window
它會自己關掉
我想看編譯完後 cout出來的值
但是因為會自動關掉
所以只能看到一下下
請問要設定什麼東西
以下是我的程式碼
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
int a[5];
for(int i=0;i<5;i++)
{
printf("第%d個數字:",i+1);
scanf("%d",&a[i]);
}
for(int i=0;i<=4;i++)
{
cout<<"\nfinial a="<<a[i];
}
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.115.221.148
1F:→ issuemylove:system("pause"); 05/07 01:15
2F:推 AmaiN:執行的時候按ctrl+f5就好 05/07 07:58
3F:推 mathtku:在RETURN 0; 前面加上 system("pause"); 05/07 23:48