Created
December 22, 2010 23:17
-
-
Save ChrisLundquist/752273 to your computer and use it in GitHub Desktop.
inheritance test
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 Physics | |
{ | |
public: | |
void Update() { std::cout << "Physics!"; } | |
}; | |
class Graphics | |
{ | |
public: | |
void Update() { std::cout << "Graphics!"; } | |
}; | |
class Shape : Physics, Graphics | |
{ | |
}; | |
int main() | |
{ | |
Shape shape; | |
shape.Update(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment