0
What are practical uses for pointers?
I'm learning C++ to get a grasp of Unity to create games and I was wondering if pointers were essential.
1 Respuesta
0
pointer keeps the adress of variable or object instance; in c++ they are often used for dynamic memory allocation.
//sample code
int *p = new int [10];
// it keeps the start address of int array
// then if we dont need it anymore
delete [] p;