簡體   English   中英

函數錯誤的類型沖突

[英]conflicting types for error for a function

在我正在研究的項目中,關於指針存在一些奇怪的錯誤。 我不太確定這是什么問題。

錯誤提示:

'undo_list'的類型沖突

Sudoku_Board* undo_list(Linked_List* list) {
    Sudoku_Board* sboard;

    if(list->current->prev == NULL) {
        return NULL;
    }

    sboard = list->current->prev->sboard;
    list->current = list->current->prev;

    return sboard;
}

在頭文件中,我有以下內容:

typedef struct sudo_board {
    int block_row;
    int block_col;
    int** board;
    int fixed_num;
    int** fixed;
    int** current_solution;
    int mark_errors_flag;
    int** errors;
} Sudoku_Board;


typedef struct node {
    struct sudo_board* sboard;
    struct node* next;
    struct node* prev;
} Element;


typedef struct {
    Element* current;
    Element* tail;
} Linked_List;

我正在使用MinGW編譯器

問題很可能是您在其他地方聲明了函數,其簽名與此處列出的簽名不匹配。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM