class C{ //methods and properties } void C::some_method(C* b){ delete this; this = b; }
This gives me follwing error when compiling:>
The error says "You can't assign b to this". As far as I know, this is something you can't change, because it's not an actual pointer, but a self-reference.
b
this