如果两个指针类型之间有继承关系,static_cast会对指针进行修正,保证其结果正确指向子对象或父对象,但reinterpret_cast不会。 struct A { virtual void a() { printf("A\ ...
確定! 回上一頁