在Java中,您只需return this获取当前对象即可.你是如何用C++做到的?
return this
Java的:
class MyClass { MyClass example() { return this; } }
c++ return this
c++ ×1
return ×1
this ×1