+ 1

Pointers in c++

can anyone simpley explain pointers in c++?

18th Sep 2021, 4:57 AM
Chiksi
Chiksi - avatar
3 Respostas
+ 2
Think of your device memory lile a room loaded with locker storages people can use for whatever. Each locker drawer has their own identification by a number, and only a key for a particular drawer opens it. Pointer is the key, it doesn't allow you to store anything, the drawer does. Though you need the key to open a drawer to put/get something there. It's really an overly simpilfied illustration. Pointer itself I think, deserves a chapter in a book to get the reader understand the idea. I would suggest you to try and search more detailed info about it on the net. Until you get better understanding about it, try to stay away from it. Learn how to use references instead 👍
18th Sep 2021, 6:08 AM
Ipang
+ 1
Pointer is a variable that is meant to store address of another variable. As simple as that.
18th Sep 2021, 6:04 AM
Arsenic
Arsenic - avatar
+ 1
Thank you guys.
18th Sep 2021, 9:21 AM
Chiksi
Chiksi - avatar