|
|
|
|
|
by pingyong
2188 days ago
|
|
I've always explained it to people like this: Imagine a big cabinet, like a bunch of safe-deposit boxes in a bank. Each box has an unique number written on it, and the boxes are simply numbered 0 to 99. Now when you open a box, you find a piece of paper in it with a number between 0 to 99. It tells you which box to open next - so it points to another box. That's a pointer. Seems to work pretty well, at least for conveying the basic idea of pointers and dereferencing. |
|