vector使用出错
Expression: vector iterator not incrementable
我用vector存指针,这些指针互相赋值了,释放内存时出现这个问题
vector<Sprite*> m_Spr;往m_Spr里存指针,然后程序结束时释放。中间我把:其中三个指针按游戏逻辑赋值给其中一个指针用来绘图,出现错误:
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\MSVCP120D.dll
File: c:\program files (x86)\microsoft visual studio 12.0\vc\include\vector
Line: 101
Expression: vector iterator not incrementable
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
线程 0x19c4 已退出,返回值为 3 (0x3)。
程序“[6304] Plane.exe”已退出,返回值为 3 (0x3)。