Skip to content
Home » malloc is undefined

malloc is undefined

Let’s start the discussion about malloc is undefined in following Approaches.

(as well as cstdio>) is a C++ header. In C, you must include . You must include where the malloc() method is located.

malloc is undefined ?

// You need:
#include<stdlib.h>

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode