This blog is going to have surfing, snowboarding, tech stuff and maybe some 'meaning of life' stuff if I'm feeling particularly stoked.

Monday, December 20, 2004

It's legal, but it ain't moral.

Just found a great C++ FAQ site which answered the one interview question I couldn't. And the best thing is that the technique described is not recommended so I don't mind not being aware of it:

You know you can override member functions in C++ without them being declared virtual; and you know when and why you should declare them virtual.

"Experienced C++ programmers will sometimes redefine a non-virtual function for efficiency (e.g., if the derived class implementation can make better use of the derived class's resources)"