I have a C program that produces an error:
invalid conversion from \'void*\' to \'node*\' [-fpermissive]
Here\'s my code:
Use:
head = (struct node*) malloc(sizeof(struct node));
C++ does not support implicit conversion of void* returned by malloc(), which C does. You'll need to typecast the return value.
void*
malloc()