#include #include using namespace std; class A { public: int x1 ; virtual void function1() { } }; class B : public A { }; class C : public A { }; int main() { int x1 ; float x2 = 10.5 ; x1 = (int) x2 ; //TO DO convert using new style x1 = static_cast (x1) ; A* ptrA = new B() ; C* ptrC ; ptrC = (C*)ptrA ; //TO DO convert using new style ptrC = dynamic_cast ( ptrA) ; if ( ptrC == NULL ) cout << "Invalid dynamic cast." << endl ; int i1 = 10 ; const int* ptr = &i1 ; int* ptr1 = (int*) ptr ; //TO DO convert using new style ptr1 = const_cast (ptr) ; char* ptr2 ; int* ptr3 = &i1 ; ptr2 = (char*) ptr3 ; ptr2 = reinterpret_cast (ptr3) ; //TO DO convert using new style return 0; }