繁体   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