Say I have an class called 'Tile'
class Tile
{
private:
int x, y;
};
And a class called 'Door' that extends 'Tile'
class Door : Tile
{
private:
bool open;
};
Can I make an array of Tile objects, for instance to create a room, and then have a Door object in the same array since it is an extension of Tile? If not are there any alternatives that I could use to accomplish this?