about multi level inheritance
This commit is contained in:
committed by
JamesFlare1212
parent
28a8f7d285
commit
235168710e
@@ -177,6 +177,10 @@ We develop this student_test.cpp program.
|
||||
|
||||
[student_test4.cpp](student_test4.cpp) In this version, we added the destructor to both the child class and the parent class. This program shows that when the child class object is destroyed, first its own destructor gets called, and then its parent destructor gets called.
|
||||
|
||||
### version 5
|
||||
|
||||
[student_test5.cpp](student_test5.cpp) In this version, we added the CSStudent class, and that introduces multilevel inheritance in the program.
|
||||
|
||||
## 25.7 What will be printed when running this program?
|
||||
|
||||
#include <iostream>
|
||||
|
||||
Reference in New Issue
Block a user