A dangling pointer points to memory no longer valid. Take address of local variable, function returns, memory gets reused. Dereferencing reads garbage or crashes. Dereferencing nullptr crashes.
Check if(ptr != nullptr) before using a pointer that might be null. This prevents mysterious crashes. Other errors: deleting memory twice, using after deletion. For now, initialize pointers and check for nullptr.