Skip to content

Instantly share code, notes, and snippets.

Created April 20, 2016 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/75997e6e5879db77e16df3d945392b9f to your computer and use it in GitHub Desktop.
Save anonymous/75997e6e5879db77e16df3d945392b9f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <random>
#include <vector>
class A {
public:
virtual void doit() { printf("A::doit\n"); }
};
class B {
public:
virtual void doit() { printf("B::doit\n"); }
};
class C : public A, public B {
public:
using B::doit;
};
int main(int argc, char** argv) {
C* c = new C();
c->doit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment