class A
{
int x;
};
class B
{
int y;
};
class C : public A, public B
{
int z;
};
void main()
{
A *aa;
B *bb;
C cc;
aa = &cc;
bb = &cc;
cout << &cc << endl;
cout << aa << endl;
cout << bb << endl;
}
aa and bb do not have the same address, due to point alignment
http://www.newlc.com/Multiple-Inheritance.html
Jan 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment