Redian新闻
>
Amazon上最搞笑的物品评论
avatar
Amazon上最搞笑的物品评论# Joke - 肚皮舞运动
h*g
1
class A
{
public:
void f{};
protected:
A(){};
A(const A&){}
}
Referring to the sample code above, why are the default and copy
constructors declared as protected?
A.
To ensure that instances of A can only be created by subclasses of A
B.
To ensure that instances of A cannot be created via new by a more derived
class
C.
To ensure that instances of A cannot be copied
D.
To ensure that A cannot be instantiated on the stack
E.
To ensure that A cannot be used as a base class
答案给的是A。 那如何由子类去创造 A 的object 呢?A * p= new subclass 可行吗?
能call A的ctr吗?
avatar
T*0
2
铀矿
http://www.amazon.com/Images-SI-Inc-Uranium-Ore/dp/B000796XXM/ref=sr_1_1?
ie=UTF8&s=industrial&qid=1291342847&sr=8-1-spell
注意看amazon的推荐
This item: Uranium Ore by Images SI Inc. $39.95
Uranium: War, Energy and the Rock That Shaped the World by Tom Zoellner
Hardcover $10.51
The Making of the Atomic Bomb by Richard Rhodes Paperback $14.00
哈哈
avatar
e*e
3
subclass 来create A 好啦~~~一定要subclass或者是friend class 哦
avatar
f*2
4
"good product, poor packaging"
I purchased it 3.75 billion years ago but when I finally opened it it was
half empty
avatar
F*r
5
那c)怎么实现?
avatar
h*e
6
不可能half empty呀。

【在 f********2 的大作中提到】
: "good product, poor packaging"
: I purchased it 3.75 billion years ago but when I finally opened it it was
: half empty

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。