亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

java - 急等。vs寫一個簡單程序關(guān)閉黑窗老是響應(yīng)很久,然后報錯,無法再次運(yùn)行
迷茫
迷茫 2017-04-18 10:52:18
0
2
613

后臺進(jìn)程里一直還關(guān)不了這個運(yùn)行臺程序,每次都要退出重進(jìn),怎么解決?。?br>

#include "stdafx.h"
#include "iostream"
#include <cstdlib>
using namespace std;


int main()
{
    int n = 1;
    cout << n;
    int nn= 3;
    cout << nn;
    int a[4];
    for (int i = 0;i < 4;i++)
    {
        a[i] = i;
    }
    for (int i = 0;i < 4;i++)
    {
        cout << a[i];
    }
    system("PAUSE");
    return 0;
}
迷茫
迷茫

業(yè)精于勤,荒于嬉;行成于思,毀于隨。

reply all(2)
黃舟

system("PAUSE"); Press any key to continue

However, once you do not enter any keys, then return 0; is not running and the process is not closed. This situation will occur if you compile with VS again.

After restarting the computer, try using the getch(); command to enter characters instead of system("PAUSE");.

劉奇
#include <iostream>
#include <cstdlib>

using namespace std;
int main()
{
    int n = 1;
    cout << n;
    int nn= 3;
    cout << nn;
    int a[4];
    for (int i = 0;i < 4;i++)
    {
        a[i] = i;
    }
    for (int i = 0;i < 4;i++)
    {
        cout << a[i];
    }
    return 0;
}

With slight modifications, everything works fine in the G++ environment.

Test the VS environment now.

Update:

Everything is normal in VS2015 environment.

Please provide more information.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template