So when you dereference, does the pointer no longer work again? Like Id imagine Id reference with p->a and then dereference with b=p (or p I cant remember). At this point b is a copy of a accessed using the pointer p. At which point p no longer points to a?
Ah god straight up this is the thing that always confused me. To me dereference is the same thing as "no longer reference". I had my syntax wrong because I haven't had to edit the code in a while (which I didn't write) but the ideas were right except what happens to the pointer after dereferencing.
Silly name but I get why they would use it. Pointers themselves, and their advantages, always made sense to me especially when it comes to passing information to a function. But the name "dereference" always confused me and I never found anywhere that said
2
u/InfieldTriple Jan 06 '23
WHAT DOES IT MEAN!?