Dangling Pointer in C++

It's not always easy to understand some concept at first. However, a good analogy can always help you to grasp it and keep remembering it. 

A dangling pointer is one of those concepts. Let me demonstrate with code first, then explain after that with an analogy. 

Categoriesc#