Personally, I'd consider doing it the other way around.



Shot* shot=dynamic_cast<Shot*>(event);
if (shot != 0 && event->getType().compare("shot")==0) {
cout <<...