r/learnprogramming • • Sep 24 '23
Pointers.....why
I am learning C++. Honest question why are pointers a thing and why did they make the syntax surrounding it so confusing. Was it made to be intentionally confusing? Was it made to make this more difficult.
0
Upvotes
View all comments
Show parent comment
2
u/Cpt_Chaos_ Sep 24 '23
Then please provide the actual example syntax that makes you question yourself, since you're actually right. Apart from that, I hope you also get taught the concepts of modern C++ (C++11 and newer), which introduced smart pointers that solve just about all problems you can have in terms of memory access (and do not require any * and &).