sizeof

#include <stdio.h>
#include <iostream>
using namespace std;
class abc
{
  private:
   int a;
  int b;
};
int main()
{
  cout << "Hello, World!" << endl;
  cout <<sizeof(abc)<<endl;
  return 0;
}

  class  : 1

   int  a  ;  //4

int a,b; //8

posted on 2021-04-20 23:43  lydstory  阅读(50)  评论(0)    收藏  举报

导航