0
![Stack Overflow](http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png)
As answer answer has already pointed out you could use dynamic_cast to do this. However you should not do it using dynamic_cast for 3 main reasons
dynamic_cast has a run-time performance impact
If you have to use dynamic_cast to get your code to work, its probably badly implemented and fragile
...