Created
March 11, 2009 17:50
-
-
Save simonask/77599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
class Mixin1 { | |
protected: | |
Mixin1() {} | |
public: | |
int a, b, c; | |
}; | |
class Mixin2 { | |
protected: | |
Mixin2() {} | |
public: | |
int d, e, f; | |
}; | |
class Foo : public Mixin1, public Mixin2 { | |
public: | |
int g, h, i; | |
}; | |
int main (int argc, char const *argv[]) | |
{ | |
Foo* f = new Foo; | |
Mixin1* m1 = f; | |
Mixin2* m2 = f; | |
printf("m1: 0x%lx, m2: 0x%lx\n", m1, m2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment