类中this指针介绍

如题 ,测试代码如下

#include <iostream>

class thisPointer
{
public:

    thisPointer()
    {
        std::cout << this << std::endl;
    }

    ~thisPointer()
    {

    }
};
int main()
{
    thisPointer* thisPt = new thisPointer();
    std::cout << thisPt << std::endl;           //构造函数中输出的this指针和new 返回的指针一样,应该是class数据的首地址 
                                                //我猜这个首地址应该是由new决定的,然后指针指向函数或者属性的地址获取内容

    int a;
    std::cin >>a;

}

输出结果:

类中this指针介绍