开发者

What is Object Eclipsing?

开发者 https://www.devze.com 2022-12-21 15:56 出处:网络
This is a question开发者_StackOverflow社区 my interviewer asked me. My Answer is - if we assign an object of the derived class to

This is a question开发者_StackOverflow社区 my interviewer asked me. My Answer is -

if we assign an object of the derived class to the reference of the base class , the members of the derived class will eclipse or hide.

he didn't tell it's wrong or right. I want to confirm it.


There is no such concept "object eclipsing".


Maybe the interviewer meant to say slicing?

That, or it was a trick question.

0

精彩评论

暂无评论...
验证码 换一张
取 消