I have created three classes (creature , dragon , wizard) dragon and wizard inherit from the creature class when I do a dynamic cast like this
void dragon::atk(creature *creat){
if(dynamic_cast<dragon*>(creat))
//
cannot dynamic_cast 'creat' (of type 'class creature*') to type 'class dragon*' (source type is not polymorphic)|
I've searched a lot but don't know why this error occur