411 REFERENCE · Wikibooks
C++ Language/Std/CRuntime/HeapMemory/Allocation
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Dynamic memory management with the C-Runtime is done by calling malloc(), which returns a pointer to the newly-allocated memory.
Give that pointer to free() when you are ready to deallocate that memory.
Additional information about dynamic memory allocation (includes interactive examples)