class Entity
{
privat:
int m_X,m_Y;
public:
virtual void Print() {
cout << x << "," <<y << endl;
}
};
class Player : public Entity
{
privat:
int m_X,m_Y;
public:
Player(int x, int y) {
m_X = x;
m_Y = y;
}
void Print() override //that means the existence of a similar method in a
class that this class is inherent from.
{
cout << x << "," <<y << endl;
//static methods deal only with static var
}
};