[問題] function(int i=6)初始值無法編譯
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
dev
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
iostream.h
問題(Question):
function(int i=6)無法編譯
餵入的資料(Input):
void votes(int *a,int b=6){
int i=0;
while(i<b){
a[i]=rand()%MOD+1;
if(check(a,i)==1)i++;
}
}
預期的正確結果(Expected Output):
檔名.cpp
可編譯
錯誤結果(Wrong Output):
無法編譯
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/W2hGwNVG
補充說明(Supplement):
請益哪邊出錯了0.0
範例大意是這樣打阿>\\\\<
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.117.8.99
※ 編輯: kingofsdtw 來自: 122.117.8.99 (04/27 14:40)
→
04/27 14:50, , 1F
04/27 14:50, 1F
→
04/27 14:58, , 2F
04/27 14:58, 2F
→
04/27 16:25, , 3F
04/27 16:25, 3F
推
04/28 17:07, , 4F
04/28 17:07, 4F
→
04/28 17:08, , 5F
04/28 17:08, 5F