|
|
|
|
|
by dmitrygr
1771 days ago
|
|
Some people just cannot wrap their head around pointers. Some just do not get recursion no matter what. I used to teach CS, and tutor in CS. It is as rare as being 7 feet tall, sadly. And without understanding indirection and recursion, the most you'll ever do is ...well..not much... |
|
You are a pointer, pointing at nothing.
Attempt to put shit where you're pointing and you have shite all over the floor.
Malloc creates a bucket. Now when you put shit where you're pointing it lands in a bucket.
When you're done with the bucket you clean it up.
If you try to put too much in the bucket, you end up with shite all over the floor.
If you forget to clean up the bucket, the place will start to stink.
If you change the pointer so nothing is pointing at the bucket of shit, then it will just sit there, forgotten. But the shit is still there.
No one ever forgets this way of teaching it.