class Student{
public:
int id;
int age;
};
int main() {
return 0;
}
If we compile such a program using gcc and -fdump-class-hierarchy
option, gcc will produce a .class
file like this:
Class Student
size=8 align=4
base size=8 base align=4
Student (0x0x7fbafc4a05a0) 0
compile command:
g++ file.cpp -o file -fdump-class-hierarchy
Obviously size
is class size.but what do align
, base align
and base size
mean in this file?