1 #include 2 #include 3 4 typedef struct node_t{ 5 int i; 6 struct node_t* link; 7 }node; 8 9 node* head =
You can't use malloc() in global scope. or you can do like follow
#include #include : node* head : : int main(){ : : head = (node *)malloc(sizeof(node)); : : }