Hình 15-12 cho thấy con trỏ lớp cơ sở (hẹp) và con trỏ lớp dẫn xuất (chất béo, với hai phần) là điểm để các đối tượng lớp cơ sở (phần tiêu tan đại diện cho phần còn thiếu nguồn gốc) và đối tượng lớp được thừa kế (phần bên trái đại diện phần cơ bản, phần bên phải đại diện cho một phần có nguồn gốc từ). | file Administrator General 20English 20Learning it2002-7-6 Figure 15-12 shows base class pointers narrow ones and derived class pointers fat one with two parts that point to base class objects the dashed part represents the missing derived part and to derived class objects the left part represents the base part the right part represents the derived part . The vertical lines inside each part represent member functions of four types. Type 1 is defined in the base class and is inherited in the derived class as is. Type 2 is added to the derived class without a counterpart in the base class. Type 3 is defined in the base class and redefined in the derived class with the same name with the same or different signatures Type 4 is defined in the base class as virtual and is redefined in the derived class with the same name and the same signature. The methods that can be called through the pointer are underlined. In case A functions of types 3 and 4 defined in the base class are hidden by the functions defined in the derived class. In case B only functions defined in the base class are accessible. In case C only functions defined in the base class are accessible but the functions redefined in the derived class as virtual hide their base class counterparts and can be called dynamically. In case D only functions defined in the base class and not redefined in the derived class can be called. Table summarizes the same rules. The columns describe kinds of objects and kinds of pointers that point to these objects the rows describe different kinds of member functions. file Administrator General 20English 20Learning it2002-7-6 961 of 1187 8 17 2002 2 58 07 PM file Administrator General 20English 20Learning it2002-7-6 Simpo PDF Merge and Split Unregistered Version - http Table . Summary of Rules for Static and Dynamic Binding Kind of Member Function Base Pointers Derived Pointers Base object Derived object Base object Derived .