Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
inheritance test
#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