Can virtual functions have default parameters?

If I declare a base class (or interface class) and specify a default value for one or more of its parameters, do the derived classes have to specify the same defaults and if not, which defaults will manifest in the derived classes?

Addendum: I’m also interested in how this may be handled across different compilers and any input on “recommended” practice in this scenario.

6 Answers
6

Leave a Comment