summaryrefslogtreecommitdiff
path: root/c,cc/padding.cc
blob: 7ac9be7c66930c720e3abe9d473b5f34eff2a456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <string>

using namespace std;

struct foo {
    int  a;
    string b;
    string b1;
    int  c;
    string b2;
    string b3;
};

struct bar {
    int  a;
    int  c;
    string b;
    string b1;
    string b2;
    string b3;
};

int
main(void)
{
  cout << sizeof(foo) << endl;
  cout << sizeof(bar) << endl;

  return 0;
}