#include <iostream>
using namespace std;
struct A
{
int v;
A(int vv) :v(vv) { }
// 在此处补充你的代码
const A* getPointer()const
{
const A* p = this;
return p;
}
};
int main()
{
const A a(10);
const A * p = a.getPointer();
cout << p->v << endl;
return 0;
}
012:这个指针哪来的
最新推荐文章于 2022-11-23 23:59:50 发布