Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Debug assertion failure? (c++)

$
0
0
Hi I get "debug assertion failure" (using Visual studio 2013) with: Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) void world::deleteArmy(army * u){ armyList.erase(u->curIt); delete u; } It happens on the delete row. "u" is still pointing to a valid instance of the army class. The armyList is a std-list of type <* army>. What can cause this? Is the iterator messed up maybe so when I erase the iterator the list gets corrupted? But shouldnt it complain on that row and not on the delete row? Thanks a lot! Erik

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>