I try to do something called linked list but just before i dive in i'm stuck. Plz help
Code:
#include <stdio.h>
#include <stdlib.h>
struct node{ //Struct node type
int data;
struct node *ptr;
};
typedef struct node Node;
Node newPtr;
Node *sPtr=NULL;
int InsNewAtFirst(int value);//Function Prototype
int main(){
InsNewAtFirst(100);
InsNewAtFirst(50);
InsNewAtFirst(150);
InsNewAtFirst(450);
InsNewAtFirst(5150);
getchar();
}
int InsNewAtFirst(int value){
newPtr=malloc(sizeof(Node)); //stuck! cannot convert 'void*' to 'Node'
};