Differece between Static and reinerpret cast [duplicate]
Possible Duplicate:
When should static_cast, dynamic_cast and reinterpret_cast be used?
class b
{
}
class d :public b
{
}
int main
{
d* d_p = new d();
b* b_p = static_cast<base*>(d_p);
b* b_p = reinterpret_cast<base*>(d_p); // any difference will it make
return 0;
}
So in the above example does static and reinterpret cast make any difference functionaly etc..? for me both are same in this scenario.
Yes, there will be a difference. You should check here
精彩评论