pointers - What does 'return *this' mean in C++? -
i'm converting c++ program c#, part has me confused. return *this mean?
template< edemocommands msgtype, typename pb_object_type > class cdemomessagepb : public idemomessage, public pb_object_type { (...) virtual ::google::protobuf::message& getprotomsg() { return *this; } }
how translate c#?
this
means pointer object, *this
object. returning object ie, *this
returns reference object.
Comments
Post a Comment