[Solved] unexpected error on using keyword “this” in c++


this is already a pointer to that object. So you should make something like this:

Area *p = this;

The this pointer is an implicit parameter to all member functions (non-static members). Therefore, inside a member function, this may be used to refer to the invoking object.

16

solved unexpected error on using keyword “this” in c++