My goal is to write a function that returns the address of the instantiated class from which it is called.
My initial guess was
return &this
But this does not yield any good results.
Any and all suggestions are much appreciated! Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply
return thiswill return the address of an object from within that object.