class CBase
{
public:
int i[255];
};
class CSubA : public CBase
{
public:
int m_iA[255];
};
class CSubC : public CBase
{
public:
int m_iC[255];
};
class CSubSub : public CSubA, public CSubC
{
public:
int m_iss[255];
};
int _tmain(int argc, _TCHAR* argv[])
{
//CFieldManager fieldManager;
//fieldManager.RegisterType("", "", 1, 1);
//unsigned short i = 0x123;
//unsigned short usMax = USHRT_MAX;
//std::cout << std::setfill ('0') << std::setw(4) << std::hex << i << std::endl;
//std::cout << std::dec << 9 << std::endl;
//std::hash_map<std::string, std::string> testMap;
//std::string strTem;
//testMap["123"] = "123";
//testMap.find(strTem);
//double dResult = 2.f / 3.f;
//TestCounting();
//TestList();
//while (true)
{
CSubA * pSubA = new CSubA;
CBase * pBaseA = pSubA;
CSubC * pSubC = new CSubC;
CBase * pBaseC = pSubC;
std::cout << reinterpret_cast<unsigned int>(pBaseA) << std::endl;
std::cout << reinterpret_cast<unsigned int>(pSubA) << std::endl;
std::cout << reinterpret_cast<unsigned int>(pBaseA) << std::endl;
std::cout << reinterpret_cast<unsigned int>(pSubC) << std::endl;
delete pBaseA;
delete pBaseC;
CSubSub * pSubSub = new CSubSub;
CSubA * pSubATest = pSubSub;
delete pSubATest;
pSubSub = new CSubSub;
CSubC* pSubCTest = pSubSub;
delete pSubCTest;
int i = 0;
}
return 0;
}