Quote of the week
Posted Dec 11, 2004 17:23 UTC (Sat) by
simlo (subscriber, #10866)
In reply to:
Quote of the week by mmutz
Parent article:
Quote of the week
Make the examble better by making f pure virtual in the base class: Then you eliminate the problem of uninitialized function pointers compile time! C++ will simply not allow you to initialize an object of this class before a method have been specified.
By having structures of function pointers there is no check on the actual pointers point to anything sensible. The only thing safe to do is to check if they are non-NULL before using them! Waste of instructions...
(
Log in to post comments)