May 2002
Beginner
320 pages
6h 18m
English
virtual should always be used on a function in the protected section. If you envision a public function being overridden, it should also get the virtual keyword.
Some programmers worry about the performance penalty of the indirect virtual function call. In truth, this is probably not a significant drag on typical program performance, compared to things such as file I/O or database access, or even the time it takes to type a character.
Read now
Unlock full access