If I use malloc in my code:
malloc
int *x = malloc(sizeof(int));
I get this warning from gcc:
gcc
new.c:7: w
You need to include the header file that declares the function, for example:
#include
If you don't include this header file, the function is not known to the compiler. So it sees it as undeclared.