What is the name of the header file that contains the declaration of malloc?

Peter picture Peter · Sep 3, 2011 · Viewed 58.6k times · Source

What is the name of the header file that contains the declaration of the malloc() function in C and C++?

Answer

Mario picture Mario · Sep 3, 2011

It's in stdlib.h (C) and cstdlib (C++).

In general, for such questions, just try to look on google: "c++ function". Most often the first hit will point to cplusplus.com for me containing a complete reference to the standard stuff.