【急求这几道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->.