我正在尝试用C编写一个链表.我正在使用这段代码:
#include <stdio.h>
typedef struct _node *nodep;
typedef struct _node {
int value;
nodep next;
} node;
int main(){
printf("Hello World!");
node* list = 0;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我得到了编译器错误C2275和C2065
node* list = 0;
Run Code Online (Sandbox Code Playgroud)
当我删除printf或移动之前的违规行时,代码会编译printf.