Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22117

Why do I get a warning every time I use malloc?

$
0
0

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’

Viewing all articles
Browse latest Browse all 22117

Trending Articles