Last active
February 21, 2017 20:04
-
-
Save wesen/94173e2ca7b568f935b8b409c1393571 to your computer and use it in GitHub Desktop.
Gist created by fiddle.jyt.io
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
| 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