Pointers are something that a lot of people struggle with. Usually, the next generation of languages handle all the complicated tasks, e.g. memory management, so you can't do the stuff you can do with C++. It's a powerful language, but it has a lot of aspects that people struggle with, e.g. templates. In general, most people struggle with nested loops and datatypes, but with C and C++ there are even more complex interactions that people can't seem to grasp.
I had to emulate inheritance with C in the early 90's using pointers to functions. Lived in a secluded place and didn't know about C++. When I learned C++ I thought I was in heaven.
Then I had to unlearn a bunch of bad habits from C. Thinking in classes is way different than calling functions, and it's way easier to avoid globals.
Also, for both C and C++, pointer arithmetic is how you slowly make your code unshippable. Besides been hard to maintain, it creates a breeding ground for security bugs. There be dragons.
View all comments
Show parent comment
12
u/kbroaster Nov 23 '17
Pointers are something that a lot of people struggle with. Usually, the next generation of languages handle all the complicated tasks, e.g. memory management, so you can't do the stuff you can do with C++. It's a powerful language, but it has a lot of aspects that people struggle with, e.g. templates. In general, most people struggle with nested loops and datatypes, but with C and C++ there are even more complex interactions that people can't seem to grasp.