现在的位置: 首页 > 综合 > 正文

测试下空类的大小

2013年08月20日 ⁄ 综合 ⁄ 共 297字 ⁄ 字号 评论关闭

#include <stdlib.h>
#include <memory.h>
#include <vector>

#include <string>
#include <iostream>
#include <windows.h>

using namespace std;
#pragma pack(push)
#pragma pack(1)

template <typename T>
class Singleton
{

};

class CMatchListMgr: public Singleton<CMatchListMgr>
{

};

int main( )
{
 cout<<sizeof(CMatchListMgr)<<endl;
 return 0;
}

抱歉!评论已关闭.