using malloc in c++ code example
Example 1: how to use malloc in c
int* a =(int*)malloc(sizeof(int))
Example 2: malloc c++
void* malloc(size_t size);
Example 3: how to use malloc in c
ptr = (cast-type*) malloc(byte-size)
int* a =(int*)malloc(sizeof(int))
void* malloc(size_t size);
ptr = (cast-type*) malloc(byte-size)