0
int status;
status=hsearch_r(wishFind,FIND,&(h->retElem),(h->htab));
print("Debug: status is %d\n",status);
結果顯示狀態是-8400
但wishFind不在h-> htab中。GNU C lib hsearch_r返回負值時的含義是什麼?
I think status need to be 0.
it's confused me that status is -8400.
Thanks!
這是實際的代碼嗎?有沒有這樣的C函數稱爲print,當前的glibc hsearch_r函數只返回0或1,所以其他事情正在發生(例如,您在代碼中某處調用未定義的行爲,可能會破壞內存,或者在調試時出錯) – nos
謝謝,不是真實的代碼,我想念「f」。我將調試內存。 – wei
大家好,問題是在代碼的其他部分的內存 – wei