Search This Blog

Saturday, November 14, 2009

C++, Override Virtual Function

  • Signature and return type of the function must match (including const at end), except
  • Return type can be a public derived type of the base type (useful for clone)
  • Default argument is not bound at runtime but compile time. i.e. base class pointer will always use base class default argument, even thought the realy underlying type is a derived type.
p.924, 942, c++ primer

No comments: