Skip to content

Instantly share code, notes, and snippets.

@simonask
Created March 11, 2009 17:50
Show Gist options
  • Save simonask/77599 to your computer and use it in GitHub Desktop.
Save simonask/77599 to your computer and use it in GitHub Desktop.
#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