Trying to explain pointers to my 6 years old.. teaching him C and
getting good at it.. its time to move to pointers and i need some
insightful analogies that I can use to explain them.. any ideas
Six? Wow ...
Does he understand telephone numbers? Perhaps you can explain
the number as the pointer value and the phone as its target. You
can write a phone number on many slips of paper and hand them out
to everyone in sight; they all point to the same phone; copying
the pointer doesn't copy the target.
Street addresses vs. houses, names vs. people (might confuse
him if he has three friends all named "Zaphod"), ...
Numeric street addresses have useful analogies when you get to
pointer arithmetic, if he doesn't get confused by the odd/even
convention for opposite sides. 41 Elm Street + 2 = 43 Elm Street,
57 Elm is 57-41 = 16 lot-spaces west of 41 Elm, 17 Elm is 17-41=-24
spaces west (same as 24 spaces east), there's no along-the-street
distance from 41 Elm Street to 79 Wistful Vista ...