C++ (Qt)#include <iostream> class A{}; class B : public A{}; class C{}; int main(){ B b; C c; A *pA = 0; pA = (A*)&c; //it's ok for compiler pA = static_cast<A*>(&c); //it's bad for compiler... well except for the one i got}
C++ (Qt)map.find( x )->second