// t.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<iostream>
using namespace std;
int checkCUP()
{
union w
{
int a;
char b;
}c;
c.a=1;
return (c.b==1);//如果是小端格式则返回1
}
class cc
{
};
int _tmain(int argc, _TCHAR* argv[])
{
cc cclass;
cout<<checkCUP()<<endl;//为1,是小端格式
cout<<sizeof(cclass)<<endl;//三个输出都为1
cout<<sizeof(cc)<<endl;
cout<<sizeof(class cc)<<endl;
while(1);
return 0;
}