typeid用法
http://blog.csdn.net/haozhi_hit/archive/2006/11/17/1392960.aspx
#include <iostream>
#include <typeinfo>
using namespace std;
class Test
{
public:
};
class FromTest : public Test
{
public:
};
int main()
{
//
//
//
//
//
//
}
Results:
$ ./typeid.exe
4Test
4Test
4Test
8FromTest