Getting object name with constructor?

Mar 11, 2013 at 7:46pm
Hi, is it possible to get object name in the constructor? I would like to initialize an object of circle class without any arguments and put some pretty lines in constructor to get and save as table of chars the name of creating object. Is it possible? I work with MSVS2012.
Mar 11, 2013 at 8:37pm
What do you mean by "... get oject name..."? Do you mean the name of the variable you are assigning the instance of your class to?
Mar 11, 2013 at 8:54pm
Yes, sexactly.
Mar 11, 2013 at 9:02pm
No it is not possible. The variable name is to help you, the programmer. Variable names doesn't exist at runtime.
Mar 11, 2013 at 9:04pm
Thank you for help.
Topic archived. No new replies allowed.