sizeof的实现(转)
帐 号: 注册帐号
密 码:  找回密码
      记住用户名和密码
sizeof的实现(转)

http://blog.csdn.net/wangkechuang/article/details/7757039

#include
using namespace std;
#define my_sizeof(L_Value) ( (char *)(&L_Value + 1) - (char *)&L_Value )

struct d
{
   int  a;
   double  b;
   char c[2];
};
struct dd
{
    int a[10];
 char b;
 double c;
 d e;
};
int main()
{
 dd f;
 cout< return 0;
}

copyright:2016-2020|邮箱:imalib@vip.163.com

蜀ICP备16020986号