What is a dangling pointer?

后端 未结 7 814
心在旅途
心在旅途 2020-11-22 02:48

I know this is pretty common question, but still new for me!

I don\'t understand concept of dangling pointer, was googling around, and writing test methods to find o

7条回答
  •  失恋的感觉
    2020-11-22 03:44

    Dangling Pointer and dangling pointer problem If any pointer is pointing the memory address of any variable but after some variable has deleted from that memory location while pointer is still pointing such memory location.

    That pointer is called as dangling pointer and the problem that arises at that time is called as dangling pointer problem.

    Here are some examples: Dangling Pointer and dangling pointer problem

提交回复
热议问题