In the project that I'm working on, there's some weird error regarding pointers. I am not really sure what the problem is here.
The error says:
conflicting types for '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;
}
And in the header file I have the following:
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;
I am using MinGW compiler
问题很可能是您在其他地方声明了函数,其签名与此处列出的签名不匹配。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.