C++ symbol restoration (Demangling), windows/linux platforms need to be handled separately.
#include <typeinfo> #include <cxxabi.h> class Foo{}; #ifndef __GNUC__ // vc const char *real_name = typeid(Foo*[10]).name(); #else // linux char *real_name = abi::__cxa_demangle(typeid(Foo*[10]).name(), NULL, NULL, NULL); #endif