What do these warnings mean?
Code:
12.8.c: In function ‘insert’:
12.8.c:29: warning: implicit declaration of function ‘malloc’
12.8.c:29: warning: incompatible implicit declaration of built-in function ‘malloc’
Code:
#include <stdio.h>
struct listnode {
int num;
struct listnode *nextPtr;
};
typedef struct listnode ListNode;
void insert( ListNode **sPtr, int number );
int main()
{
// printf( "Hello, world\n" );
return 0;
}
void insert( ListNode **sPtr, int number )
{
ListNode *newPtr;
newPtr = malloc( sizeof( ListNode ) );
if ( newPtr != NULL ) {
printf( "hello" );
}
}