这是我的第一个 C 程序,我不知道为什么会出现以下错误。
#include <stdio.h>
#include <stdlib.h>
typedef struct {
struct ListNode* next;
int content;
} ListNode;
int main() {
//puts("Hello UPC World"); /* prints Hello UPC World */
//ListNode* h = malloc(sizeof(ListNode));
gridinit(3, 5);
//int c = h->content;
//printf("%d",c);
return EXIT_SUCCESS;
}
ListNode* gridinit(int numcolumns, int numrows) {
ListNode* head = malloc(sizeof(ListNode));
head->content = 2;
head->next = NULL;
return head;
}
为什么我会收到一条错误消息
func gridinit() 中的类型冲突