lundi 30 octobre 2017

Choosing one of two pure virtual functions in c++

Is there a way for a derived class to choose to implement one of two pure virtual functions?

In my case, these pure virtual functions serve the same general purpose, but in certain settings of the class, one will require the function with an additional parameter. Of course there is always the option of making one pure virtual function with the full parameter set. However in this case there will always be the possibility of the end-user wondering about this extra parameter he isn't using.

Aucun commentaire:

Enregistrer un commentaire