Alright. That makes sense. Is it okay to make a new class for every menu I have? For example, have a class FirstMenu, SecondMenu, ThirdMenu, all the way up to like 10 menus, that all extend the abstract class? I didn't want to go overboard with classes, so I avoided that, but I thought of doing something similar. My main method is quite bloated as of right now as a result.
Yeah thats fine thats what specialisation in inheritance is for, but you should try to push common functionality to the base class still if possible. I wouldn't name them as you just suggested though I'd call them that because it was an example only. Names like MainMenu, OptionsMenu, GraphicsMenu are far better, I am using a game as example here only.
And what I mean with common functionality is stuff like the strings for a screen can be stored in a vector in the base class, the display function doesn't nessecarily need to be virtual as a likely implementation would be this in the base class:
void MenuState::display()
{
for(std::vector<std::string>::iterator it = m_strings.begin(); it != m_strings.end(); ++it)
{
std::cout << *it << std::endl; //Output all the strings in the string vector line by line.
}
}