字典翻译 问答 其它 【急求这几道c++题的答案,英文更佳1.WhatdoesinheritancemeaninC++?SupposeyouhaveclassAandclassB,underwhichofthefollowingtwoconditionsclassBshouldinheritfromclass(1)AisapartofB.(2)BisakindofA.2.Whens】
问题标题:
【急求这几道c++题的答案,英文更佳1.WhatdoesinheritancemeaninC++?SupposeyouhaveclassAandclassB,underwhichofthefollowingtwoconditionsclassBshouldinheritfromclass(1)AisapartofB.(2)BisakindofA.2.Whens】
问题描述:

急求这几道c++题的答案,英文更佳

1.WhatdoesinheritancemeaninC++?SupposeyouhaveclassAandclassB,underwhichofthefollowingtwoconditionsclassBshouldinheritfromclass

(1)AisapartofB.

(2)BisakindofA.

2.Whenshouldthekeywordvirtualbeplacedbeforeamemberfunctionofaclass?Doallofthevirtualmemberfunctionshavetobeoverriddeninthederivedclass?Ifnot,why?

3.DoesC++supportmultipleinheritance?Somepeoplethinkthatmultipleinheritancecancauseavarietyofambiguityproblems.Trytoexplainwhatproblemswillmultipleinheritancecauseandhowtoavoidthem.

4.WhatoperatorscannotbeoverloadedinC++?Whatrestrictionappliestooverloadingthefollowingoperators?

=,(),[],and->.

傅建奇回答:
  1.Inheritanceallowsonedatatypetoacquirepropertiesofotherdatatypes.the2ndcondition(BisakindofA)2.(1)Whenaclassishavingserveralbaseclassesandthecallofmemberfunctionisam...
点击显示
其它推荐
热门其它推荐
  • 其它