Wednesday, November 18, 2009

C++ Inheritance

Implicit vs Explicit Calls in C++


(Base&)*this = rhs; // IMPLICIT CALL
(*this).Base::operator=(rhs); // EXPLICIT CALL

1 comment:

  1. In the C++ programming language, virtual inheritance is a kind of inheritance that solves some of the problems caused by multiple inheritance (particularly the "diamond problem") by clarifying ambiguity over which ancestor class members to use. It is used when inheritance is representing restrictions of a set rather than composition of parts. A multiply-inherited base class is denoted as virtual with the virtual keyword.

    magnesium

    ReplyDelete