For the same code :
class B{
public:
int age;
int code;
B(){
cout << "Age | " << &age << endl;
cout << "Code | " << &code << endl;
}
};
int main()
{
B obj;
cout << "Object | " << &obj << endl;
return 0;
}
Output :
Object | 0x6afef8
this object is just a pointer right ? how this pointer points to all the member classes ?
how to get the offsets of the class member ?