應阿那達的要求,我跟她一起組隊,參加9/22這一場賽事!從來沒看過這麼愛寫程式的女生,就連我大學班上第一名的女同學,也沒有她這麼熱血。阿那達為了獎品三張電影票,決定和同門師兄弟一決勝負,曾經參加過NCPC和ICPC賽事的我,這種小比賽還算得心應手,就算那是我四年前,還是青春熱血大三時代的事:P
不過我倒是頭一次參加PTC程式設計比賽,所以今晚9/21晚上七點是測機時間,我登入屬於師大的test2帳號,開始探索線上競賽平台如何使用。
話說之所以有那麼多compile error是因為我用了該系統中函式庫沒有的定義,以至於在compile時期發生錯誤。我用了:
system("pause");
return EXIT_SUCCESS;
以上兩個指令在編譯時期都會有問題,拿掉system(“pause"),且將EXIT_SUCCESS用0取代,這樣就沒問題了。
Compiling failed with exitcode 1, compiler output:
source.cpp: In function ‘int main()’:
source.cpp:23: error: ‘system’ was not declared in this scopeCompiling failed with exitcode 1, compiler output:
source.cpp: In function ‘int main()’:
source.cpp:24: error: ‘EXIT_SUCCESS’ was not declared in this scope
system(“pause")其實是呼叫Windows裡頭的pause.exe出來執行,看來該系統並非Windows,所以無法使用。



隨意留個言吧:)~