#include
#include
struct NODE {
char* name;
int val;
struct NODE* next;
};
typedef struct NODE Node;
Node *head, *tail;
he
Try putting the malloc and variable declarations in a main function, and delete the cast on malloc. It should look like this:
#include
#include
int main(){
struct NODE
{
char* name;
int val;
struct NODE* next;
};
typedef struct NODE Node;
Node *head, *tail;
head = malloc( sizeof(Node) ); //line 21
}