tags:
- Cpp
aliases:
- Casting in C++ (Part III)
Dynamic Casting in C++
Do this at first: Virtual Dispatch in C++
works with pointers and refs (you need a vtable and all this), which is more expensive. But it's safe. If bad cast happens, it simply return a nullptr
rtti required