Here ya go. One problem was you didn't prototype your function. Another was your if statement.
Code:
#include <stdlib.h>
#include <stdio.h>
typedef struct ListNode * ListNodePtr;
typedef struct ListNode
{
int data;
ListNodePtr * next;
}ListNode;
int ListInsert(ListNodePtr *head, int data);
int main (void)
{
int data;
ListNodePtr root = NULL;
if(!ListInsert(&root, data))
{
printf("Insertion of node falied\n");
}
return 0;
}
int ListInsert(ListNodePtr *head, int data)
{
return 0;
}
Edit: Argh... beaten to the punch.