Re: How many bytes per Italian character?



You failed your interview.

You CAN implement pure virtual function. Your implementation will be used
when it's called from your class constructor or destructor.

"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:JjXRh.6654$u03.1267@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Nobody" <Nobody@xxxxxxxxx> wrote in message
news:OyktCmUeHHA.2332@xxxxxxxxxxxxxxxxxxxxxxx
One of the top questions I have been asked is about pure virtual
functions.
I understand what they are, but I have yet to actually implement them.


Trick question: you can't implement a pure virtual function because by
definition it doesn't have an implementation! :-)

-- David



.



Relevant Pages

  • Re: How many bytes per Italian character?
    ... You CAN implement pure virtual function. ... when it's called from your class constructor or destructor. ... there is some practical purpose for this (and by practical, ...
    (microsoft.public.vc.mfc)
  • Re: How many bytes per Italian character?
    ... You CAN implement pure virtual function. ... when it's called from your class constructor or destructor. ... there is some practical purpose for this (and by practical, ...
    (microsoft.public.vc.mfc)
  • Re: How many bytes per Italian character?
    ... You CAN implement pure virtual function. ... when it's called from your class constructor or destructor. ... These things are the kind of intricacies and exceptions-to-rules that ...
    (microsoft.public.vc.mfc)
  • Re: clarification - calling virtual function from destructor
    ... >>The destructor here has undefined behavior because it's calling ... > But isn't the pure virtual function defined through class B? ... When you enter A's destructor B has already been destroyed, ...
    (comp.lang.cpp)

Loading