Possible Duplicate:
c-style cast vs reinterpret_cast
What is the difference between:
A* pA = new B;
B* p1 = (B*)pA;
B* p2 = reinterpret_cast<B*>(pA);
Are they both identical ways of doing the same thing? Is there any reason to choose one over the other? Should the "C style" cast be avoided in C++ code?