Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get pointer to class itself?

Status
Not open for further replies.

sulacco

Technical User
Nov 8, 2002
74
RU
I want create function in class which returns pointer on itself.
How member function of class looks like which returns a pointer on the class itself?
 
> How member function of class looks like which returns a
pointer on the class itself?

Pointer to the class?

If you want to return a pointer to the object, use the keyword [tt]this[/tt].
 
C++ isn't Java or C#, there is no Class class, there is no reflection, and you can't do anything like that. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top