[ create a new paste ] login | about

Link: http://codepad.org/pH0eZAQd    [ raw code | output | fork ]

C++, pasted on Jul 23:
1
2
3
4
5
6
7
8
9
10
struct B1 {};
struct B2 {};
struct D  : B1, B2 {};

int main() {
   D d;
   
   cout << sizeof(B1) << " ";
   cout << (B1*)&d << " " << (B2*)&d;
}


Output:
1
1 0xbf9dd48b 0xbf9dd48b


Create a new paste based on this one


Comments: