c – Incompatible implicit declaration of built-in function ‘malloc’
c – Incompatible implicit declaration of built-in function ‘malloc’
You likely forgot to #include <stdlib.h>
You need to #include <stdlib.h>
. Otherwise its defined as int malloc()
which is incompatible with the built-in type void *malloc(size_t)
.
c – Incompatible implicit declaration of built-in function ‘malloc’
Youre missing #include <stdlib.h>
.