留言

主題:

我已經設定好環境變數,但做TestRun時仍提示Error

留言人:

Binota
留言日期: 2011/11/19 上午 11:27:50
留言IP: 220.132.50.160
留言內容: 如提

我的環境變數是設定為『C:\Dev-Cpp\bin』
在cmd下g++ -lm可執行,
cmd下以g++ -lm -o XXX.exe XXX.cpp
編譯後的執行檔也可以正常執行
以PC^2 Submit時,評審給的回覆為『Yes』

但是Test卻提示Problem executing compiler, contact staff.
還有PC2: execution of program did not generate any output
目前回應文章
回覆人 主題 回覆日期
KPRe::2011/11/19 下午 01:44:16
BinotaRe::2011/11/19 下午 03:36:21
下一頁 最後一頁 頁次:1/1
我要回覆
您所選擇的文章內容

主題:

暱稱:

Binota
留言日期:2011/11/19 下午 03:36:21
留言IP:220.132.50.***
內容:
剛剛再試了一次,這次選擇了Test,一開始跳出了Compiling的計時視窗(之前沒有)
接著跳出Execution Timer視窗並跳出了選擇檔案的視窗,
再來又是個錯誤訊息:PC2: execution of program did not generate any output

可是我是遵守著『標準螢幕輸出』來寫程式
(抱歉喔,因為我沒有指導老師。。。。)

附上原始碼:
#include <iostream>

using namespace std;

int main(){
int t;
int a,b;
int answer[128];
cin >> t;
for (int i = 0 ; i < t ; i++){
cin >>a >> b;
answer[i] = a + b;
}
for (int j = 0; j < t ; j++)
cout << answer[j] << endl;
// ↑ COUT 放在這裡,這是標準輸出
}


Binota said----
>如提
>
>我的環境變數是設定為『C:\Dev-Cpp\bin』
>在cmd下g++ -lm可執行,
>cmd下以g++ -lm -o XXX.exe XXX.cpp
>編譯後的執行檔也可以正常執行
>以PC^2 Submit時,評審給的回覆為『Yes』
>
>但是Test卻提示Problem executing compiler, contact staff.
>還有PC2: execution of program did not generate any output
end of Binota said----
回到首頁 聯絡我們 留言版 常見詢答 最新消息 我們的服務