Every time I try to compile my program i get the error: error C2440: 'initializing' : cannot convert from 'void *' to 'node *'
To be honest I dont understand the error and i have changed the line a few times to fix it but to no avail
The code containing the line and the struct declarisation is below:
Thanks for any help given
struct node *next;
struct node *CTaxi_addTaxi(struct node **p, int i)
struct node *n = malloc(sizeof(struct node)); //ERROR ON THIS LINE!
if (n == NULL)
n->next = *p;
*p = n;
n->data = i;