jeudi 7 octobre 2021

C++: Should you use the 'virtual' keyword in derived classes? [duplicate]

C++: Should you use the 'virtual' keyword in derived classes?

There is a badly out-of-date answer to this question that Google returns as the first result if you search 'c++ virtual keyword in derived classes' here:

C++ "virtual" keyword for functions in derived classes. Is it necessary?

Unfortunately, the prominence of that link and significant up-voting of obsolete answers is likely misinforming many. Answering own question.

Aucun commentaire:

Enregistrer un commentaire