Is it possible to get the object name too?
#include class one { public: int no_of_students; one() { no_of_students = 0; } void new
To get class name without mangling stuff you can use func macro in constructor:
class MyClass { const char* name; MyClass() { name = __func__; } }