Monday, January 05, 2015

Constant pointer and pointer to a constant, yet another attempt

Master: Appears that 'pointer to a constant' and 'constant pointer' are not understood by so many C++ programmers.

Grasshopper: Ain't that simple, one could not change the value when it is a 'pointer to a constant' while the pointer could not be changed for a 'constant pointer'.

Master: That is what all of them recite like a nursery rhyme, rarely does one tell me what is what.

Grasshopper: Hmm....

Master: Hmm...

Grasshopper: Hmm?

Master: Right, amongst the many attempts around the world the below image is my effort. I really hope this will close the gap that I just noticed.





Grasshopper: I do not think it could be further simplified, I won't ever forget it. Thank you very much.

Master: <Smiles and bows> We could now talk of the differences in them.

Grasshopper: Which become so obvious now...

No comments: