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.

17th Apr 2018, 11:13 PM
Matt Manuel
Matt Manuel - avatar
1 ответ
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;
18th Apr 2018, 12:17 AM
Sokrat_Poghosyan
Sokrat_Poghosyan - avatar