Created
July 14, 2014 17:46
-
-
Save joe714/9aa2da548652aefa7a65 to your computer and use it in GitHub Desktop.
This file contains 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 <iostream> | |
class A { | |
public: | |
virtual int get_foo() = 0; | |
}; | |
class B { | |
public: | |
virtual int get_foo() { return 3; } | |
}; | |
class C : public A, B { | |
}; | |
int main(int argc, char** argv) { | |
A* a = new C(); | |
std::cout << a->get_foo() << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment