+ 1

C++ Pointers

I don’t think I fully understand, what’s the practical usage of pointers in C++?

18th Jan 2018, 6:24 AM
Ismail Hasan
Ismail Hasan - avatar
4 Answers
+ 10
@Ismail I'd say so. Most of my work which involves pointers, would involve dynamic memory allocation. E.g. Dealing with linked lists, binary trees. https://www.cprogramming.com/tutorial/lesson18.html
18th Jan 2018, 6:30 AM
Hatsy Rei
Hatsy Rei - avatar
18th Jan 2018, 6:28 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
So it’s mainly for dynamic memory allocation then?
18th Jan 2018, 6:29 AM
Ismail Hasan
Ismail Hasan - avatar
0
@Ismail Hasan or link to pointer the address of another variable. int x = 64; int* y = &x;
18th Jan 2018, 7:05 AM
Cain Eviatar
Cain Eviatar - avatar