c++ cast address as string code example
Example: pointer address to string
#include <sstream> //for std::stringstream
#include <string> //for std::string
const void * address = static_cast<const void*>(this);
std::stringstream ss;
ss << address;
std::string name = ss.str();