dynamic cast throws pointer is not std::__non_rtti_object

后端 未结 2 1727
有刺的猬
有刺的猬 2021-01-22 20:54

I\'m having problem with dynamic_cast. i just compiled my project and tested every thing in debug mode and then i tried compiling it in release mode, i have copied every configu

2条回答
  •  無奈伤痛
    2021-01-22 21:30

    Does CCNode have any virtual functions? Are all elements of temp->getChildren()->begin() really CCNodes? Does temp->getChildren() return a reference? The latter is especially insidious: you call both temp->getChildren()->begin() and temp->getChildren()->end(). If getChildren() returns a copy, you're taking the begin of one copy and the end of another copy.

提交回复
热议问题