DEV Community

Discussion on: What did you have the hardest time learning?

Collapse
 
martyhimmel profile image
Martin Himmel

This is very specific, but pointers and references in C++. I started going through a couple books on C++ around 2001 or 2002. When it got to the chapter on pointers and references, it did not make sense to me.

About 3 years ago, I was teaching JS and PHP to a few coworkers. A question came up where I ended up explaining pass-by-value and pass-by-reference, and how they work in memory. At the end of my explanation, I realized I finally understood how pointers/references in C++ work (generally, not syntactically - it's been too long for that), while using PHP as the example. 😅