[ create a new paste ] login | about

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

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

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


Output:
1
0xbf814ab4 0xbf814ab8 0xbf814ab4


Create a new paste based on this one


Comments: