0

What do you need a pointer for?

Do they have a broader scope than local vars? If not, why not just call the var?

24th Apr 2019, 12:35 AM
hgg ohh
hgg ohh - avatar
2 Answers
+ 1
For example they are used for memory managment. Please use the search bar. This question has been asked multiple times. https://www.sololearn.com/discuss/1724718/?ref=app https://www.sololearn.com/discuss/1753953/?ref=app https://www.sololearn.com/discuss/1692280/?ref=app
24th Apr 2019, 6:34 AM
Dragonxiv
Dragonxiv - avatar
0
Yeah i searched a d found nothing that i understood. The first post uou linked explained it. Variables are stored on the heap and stack but pointers just on the stack, so much less memory needed.
24th Apr 2019, 6:57 AM
hgg ohh
hgg ohh - avatar