Sant
2007-11-29 02:10:58 UTC
i am trying to get the object name, see the code below, but not able to find method, what could be the code in place of ???????.
#include "iostream"
using namespace std;
class A{
public:
int i;
void printObjectname(){
cout << ????????;//<--what could be here, to print the object name as 'objectA'
}
};
int _tmain(int argc, _TCHAR* argv[])
{
A *objectA = new A();
objectA->printObjectname();
return 0;
}