What does the override specifier on a member function tell the C++ compiler?
Correct answer D. That the function must override a base class virtual function, or compilation fails
Explanation
override, added in C++11, states the intent to override a virtual function. If no matching virtual function exists in a base class, for example because of a typo, a differing parameter type or a missing const, the program is ill-formed and the compiler reports an error. Preventing further overriding is the job of final, not override.
Answer checked How we write and check questions
Discussion