Question: > 
> **Possible Duplicate:**  
> 
> [Regular cast vs. static\_cast vs. dynamic\_cast](https://stackoverflow.com/questions/28002/regular-cast-vs-staticcast-vs-dynamiccast) 
> 
> 
> 

I don't quite get when to use static cast and when dynamic. Any explanation please?

Answer: 
In some contexts, like this one, "static" refers to compile-time and "dynamic" refers to run-time.

For compile-time checking, use static\_cast (limited to what the compiler knows).
For run-time checking, use dynamic\_cast (limited to classes with RTTI).
For no checking, use reinterpret\_cast.
If you are talking about C++. Then static\_cast is not safe type of casting. It can cast to your type but if its wrong it will not throw any error/message. So you will get bad object from that. And the dynamic\_cast is throwing error if the casting failed :) Hope this helps ! :)