#include<stdio.h>
#include<stdlib.h>
struct node{
int data;
struct node *nextNode;
};
int main(){
struct node node1,*nptr;
node1.data=10;
node1.nextNode=NULL;
nptr=&node1;
nptr= malloc(sizeof(struct node));
nptr->data=100;
nptr->nextNode=&node1;
return 0;
}
When I compile this part of code in my computer I get this error:(I use DEV C++)>>>> ERROR: invalid conversion from´void*' to ´node*'
but when I compiled it in my friend compiler(DEV C++) , it works seamlessly.
I WANT TO KNOW WHAT MY COMPILER PROBLEM IS?











