由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - How to understand the answer.
相关主题
C++ private inheritance. v.s. composition什么地方用到 Private inheritance
C++ virtual function 定义在 derived class 会怎么样?C++ Primer 上关于inheritance protected member 的一段话
请问C++小白问题Help! Virtual Destructor
c++ question, thanksAn interesting C++ compile error
how to create an instance of base class in its derived class definitionC++ 弱问一个
C++问题几个C++小插曲
C++ online Test 2题A C++ compiler related interview question
[合集] protected inheritance in C++C++问题
相关话题的讨论汇总
话题: virtual话题: answer话题: base话题: understand话题: instance
进入Programming版参与讨论
1 (共1页)
c**********e
发帖数: 2007
1
Question:
Which one of the following statements is true when a derivation inherits
both a virtual and a non-virtual instance of a base class?
Correct Answer:
Each derived class object has a base object from the virtual instance and a
base object from non-virtual instance.
Comment:
This is correct. The existence of a virtual base does not imply the use of
virtual in the base class list where it is not specified (C++ Standard 10.1/
6).
c**********e
发帖数: 2007
2
Does the question talk about multiple inheritance? This is a point that
I am not sure. Any guru, help please!

a
of
1/

【在 c**********e 的大作中提到】
: Question:
: Which one of the following statements is true when a derivation inherits
: both a virtual and a non-virtual instance of a base class?
: Correct Answer:
: Each derived class object has a base object from the virtual instance and a
: base object from non-virtual instance.
: Comment:
: This is correct. The existence of a virtual base does not imply the use of
: virtual in the base class list where it is not specified (C++ Standard 10.1/
: 6).

1 (共1页)
进入Programming版参与讨论
相关主题
C++问题how to create an instance of base class in its derived class definition
C++ Q98: Call member function in virtual function (转载)C++问题几个
弱问一个virtual function的问题C++ online Test 2题
请教一个class design的问题[合集] protected inheritance in C++
C++ private inheritance. v.s. composition什么地方用到 Private inheritance
C++ virtual function 定义在 derived class 会怎么样?C++ Primer 上关于inheritance protected member 的一段话
请问C++小白问题Help! Virtual Destructor
c++ question, thanksAn interesting C++ compile error
相关话题的讨论汇总
话题: virtual话题: answer话题: base话题: understand话题: instance