在函数中,如何给this
赋值?
最佳答案
您可以将对象 this
指向:
*this = XY;
但是你不能直接赋值this
:
this = &XY; // Error: Expression is not assignable
关于c++ - 如何在 C++ 中为指针 'this' 赋值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13476879/