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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -