is'nt it the same?:
Code:
struct list
{
int data;
struct list *link;
};
typedef struct list NODE;
typedef NODE *theNode;
with
Code:
typedef struct list
{
int data;
struct list *link;
}NODE;
NODE *theNode;
isn't it the same? i'm getting lots of errors when i implement the second (typedef) into my Linked List below:
heres what my lecturer did which i want to change:
Code:
#include<stdio.h>
#include<stdlib.h>
/* the NODE structure */
struct list
{
int data; //for each data enterd
struct list *link;
};
typedef struct list theNode;
typedef theNode *NODE;
void insertNode(NODE *, int );
void printer(NODE);
i just want to change it to:
Code:
typedef struct list
{
int data;
struct list *link;
}NODE;
NODE *theNode;
i got lots of errors if i chage it, whats wrong??
i hope u guys help me