4
![Stack Overflow](http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png)
You use of C casts is killing you.
It is especially liable to break in situations with multiple inheritance.
You need to use dynamic_cast<> to cast down a class hierarchy. Though you can use static_cast<> to move up (as I have done) but sometimes I think it is clearer to use dynamic_cast<> to mo...