What's the difference between a derived object and a base object in c++?

前端 未结 10 1870
一个人的身影
一个人的身影 2021-01-01 06:23

What\'s the difference between a derived object and a base object in c++,

especially, when there is a virtual function in the class.

Does the derived object

10条回答
  •  执念已碎
    2021-01-01 07:06

    base- is the object you are deriving from. derived - is the object the inherits his father's public (and protected) members.

    a derived object can override (or in some cases must override) some of his father's methods, thus creating a different behavior

提交回复
热议问题