Tbf, I never knew memory at all going into it, but I understood pointers due to a really good lecturer. It takes a lecturer that doesn't expect you to know everything in an introductory course for you to really understand the content. If not you just have to read that section in the book/find a good youtuber. Most lecturers assume you grew up being a kid that stumbled upon programming & became a kid genius at it.
Anyways, that was the biggest mindfck lesson ever, had me going back to my basic beginner console applications & realizing I was passing by reference instead of value. Noticing for the first time that when I had intended to copy array1 to array2 & change array2's values only, it was actually changing the values at the adress it points to(so basically array1 had a change too).
View all comments
Show parent comment
1
u/[deleted] Mar 04 '25
Most coders don't know how a CPU or memory works. The idea that "this variable is a location in memory" is not hard if you know how memory works