Ole*_*siy 1 c++ null pointers exception
我不明白为什么会发生这样的错误:
while (currentNode != nullptr)
currentNode = currentNode->parent;
Run Code Online (Sandbox Code Playgroud)
我的while循环的条件应该阻止它....
0xCCCCCCE0看起来很像0xCCCCCCCCVisualC++在调试版本中放入任何未初始化的局部变量.
所以我的猜测是你忘了设置nullptr你的currentNode或一些parent.