派生类中this指针的地址变化
那么谈本次内容之前,我们先来看一段代码
#include <iostream>
using namespace std;
class Base1
{
public:
Base1() {
cout << "Base1::CTOR():" << static_cast<const void *>(this) << endl; }
void func1() {
cout << "Base1::func1():" << static_cast<const void *>(this) << endl