Skip to content

Instantly share code, notes, and snippets.

@wesen
Last active February 21, 2017 20:04
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 wesen/94173e2ca7b568f935b8b409c1393571 to your computer and use it in GitHub Desktop.
Save wesen/94173e2ca7b568f935b8b409c1393571 to your computer and use it in GitHub Desktop.
Gist created by fiddle.jyt.io
class I_A {
public:
virtual void func1() = 0;
};
class C_A : public I_A {
public:
C_A() { }
void func1() override { }
};
class I2_A : public I_A {
public:
virtual void func2() = 0;
};
class C2_A : public I2_A, public C_A {
public:
C2_A() : C_A() { }
void func2() override { }
};
int main(int argc, char *argv[])
{
C2_A a2;
a2.func1();
a2.func2();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment