[問題] 一小段遞迴程式問題
小妹程式弱弱的 寫了一段遞迴 實在不清楚錯在哪
希望大家能幫我看看
int count(int n, int s, int t){
int x=0;
if(n==2)
return 1;
if(n>=3){
for(int v_i=1;v_i<=5;v_i++){
if(tmpM[s][v_i] && !on_path(s,v_i,t)){
x += count(n-1, s, t);
}
}
return x;
}
}
錯誤訊息:
In instantiation of `std::iterator_traits<int>':
95 instantiated from here
129 stl_iterator_base_types.h `int' is not a class, struct, or union type
Build Error
What's wrong? 0.o
希望大大們能不吝回答~
感恩 ^_^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 112.104.85.56
推
01/11 02:54, , 1F
01/11 02:54, 1F
→
01/11 10:34, , 2F
01/11 10:34, 2F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章