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?
2 Respostas
+ 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
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.