How to get proper text name of typeid()
Posted
by Vincenzo
on Stack Overflow
See other posts from Stack Overflow
or by Vincenzo
Published on 2010-05-11T08:25:54Z
Indexed on
2010/05/11
8:44 UTC
Read the original article
Hit count: 134
c++
My code:
namespace test {
class MyTest {
};
}
MyTest a;
cout << typeid(a).name();
This is what I see (i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)):
N4test6MyTestE
Is there any platform-independent way to get something like test::MyTest
instead of this string?
© Stack Overflow or respective owner