2
我想檢查一個鏈接列表的元素每個持有一個整數,如果一個值已經在裏面。C:衝突類型錯誤
struct ListenElement{
int wert;
struct ListenElement *nachfolger;
};
struct ListenAnfang{
struct ListenElement *anfang;
};
struct ListenAnfang LA;
bool ckeckForInt(int value){
if (LA.anfang == NULL){
return 0;
}
return checkCurrent(LA.anfang, value);
}
bool checkCurrent(struct ListenElement* check, int value){
if (check->wert == value){
return true;
}
else if (check->nachfolger != NULL){
return checkCurrent(check->nachfolger, value);
}
else{
return false;
}
}
我得到一個衝突的類型爲checkCurrent方法,但找不到它。