In a system where registered objects must have unique names, I want to use/include the object\'s this pointer in the name. I want the simplest way to create
this
You could use string representation of the address:
#include //for std::stringstream #include //for std::string const void * address = static_cast(this); std::stringstream ss; ss << address; std::string name = ss.str();