If I use malloc
in my code:
int *x = malloc(sizeof(int));
I get this warning from gcc
:
new.c:7: warning: implicit declaration of function ‘malloc’ new.c:7: warning: incompatible implicit declaration of built-in function ‘malloc’
I'm new to C. Am I doing something wrong?