i*t
2 楼
以下几点很迷糊
基类 纯虚函数 需要写个实现吗?
子类 纯虚函数 需要写个实现吗?
基类 虚函数 需要写个body吗?
子类 虚函数 需要写个body吗?
什么情况下 定义完了 必须写个实现
等等此类问题
对了 还有什么 纯虚构造 析构函数之类的
主要是 麻烦解释一下原因 现在看得有点迷糊
thx
基类 纯虚函数 需要写个实现吗?
子类 纯虚函数 需要写个实现吗?
基类 虚函数 需要写个body吗?
子类 虚函数 需要写个body吗?
什么情况下 定义完了 必须写个实现
等等此类问题
对了 还有什么 纯虚构造 析构函数之类的
主要是 麻烦解释一下原因 现在看得有点迷糊
thx
w*p
3 楼
娃的玩具太耗电池了,不知道最近有没有电池的deal啊
L*1
4 楼
不要迷恋哥,哥只是个传说
l*i
5 楼
基类纯虚函数可以有实现也 可以没有
子类虚函数应该要实现,否则无法编译
子类虚函数应该要实现,否则无法编译
s*y
6 楼
Target has Energize Max 16 pk battery 30% off clearance price at $7.xx.
There is $1 MQ and $1 target coupon at target.com
There is $1 MQ and $1 target coupon at target.com
l*i
9 楼
= 0 means derived classes must provide an implementation, not that the base
class can not provide an implementation.
请参见: http://stackoverflow.com/questions/2089083/pure-virtual-function-with-implementation
【在 r**h 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 有实现了就不是纯虚函数了。。。
class can not provide an implementation.
请参见: http://stackoverflow.com/questions/2089083/pure-virtual-function-with-implementation
【在 r**h 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 有实现了就不是纯虚函数了。。。
i*t
11 楼
我看看这个链接
把这个理清楚一下
感觉各种组合很多很多啊
base
【在 l***i 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: = 0 means derived classes must provide an implementation, not that the base
: class can not provide an implementation.
: 请参见: http://stackoverflow.com/questions/2089083/pure-virtual-function-with-implementation
把这个理清楚一下
感觉各种组合很多很多啊
base
【在 l***i 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: = 0 means derived classes must provide an implementation, not that the base
: class can not provide an implementation.
: 请参见: http://stackoverflow.com/questions/2089083/pure-virtual-function-with-implementation
r*n
13 楼
two cases:
1. pure virtual destructor: yes, you have to provide a definition, although
it could be just an empty one. Otherwise cannot compile
2. other pure virtual member functions: you may or may not, both legal
you don't have to. If not and it's not pure virtual destructor, then the
derived class becomes abstract.
virtual function is just like normal function (non-template), you cannot
just declare it without defining it.
【在 i******t 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 以下几点很迷糊
: 基类 纯虚函数 需要写个实现吗?
: 子类 纯虚函数 需要写个实现吗?
: 基类 虚函数 需要写个body吗?
: 子类 虚函数 需要写个body吗?
: 什么情况下 定义完了 必须写个实现
: 等等此类问题
: 对了 还有什么 纯虚构造 析构函数之类的
: 主要是 麻烦解释一下原因 现在看得有点迷糊
: thx
e*i
17 楼
buy rechargeable.
Sanyo's Eneloop is very good.
http://www.amazon.com/Sanyo-277265-eneloop-Power-Pack/dp/B002NSX60I/ref=sr_1_3?ie=UTF8&s=electronics&qid=1276573683&sr=8-3
Cosco has this for $19.99 sometimes.
【在 w********p 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 娃的玩具太耗电池了,不知道最近有没有电池的deal啊
Sanyo's Eneloop is very good.
http://www.amazon.com/Sanyo-277265-eneloop-Power-Pack/dp/B002NSX60I/ref=sr_1_3?ie=UTF8&s=electronics&qid=1276573683&sr=8-3
Cosco has this for $19.99 sometimes.
【在 w********p 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 娃的玩具太耗电池了,不知道最近有没有电池的deal啊
相关阅读
请问有人收到discover的50off50 boost mobile的50刀吗?本周cvs的欧莱雅算deal吗?CVS 烧白条+滚白条, 这周可以买大红霜回国机票请问CVS小红机出的5off15 cosmetic胖子能用在护肤品吗?E家奶票求换S家(附送过期E家奶票)shopdiscover进去用别的信用卡结账能拿到cashback么? (转载)国内的菜籽油是canola oil吗?下两周看奥斯卡提名电影有买一送一活动 (转载)Samsung SL-M2825DW/XAC Wireless Monochrome PrinterWe would like your opinion for Extra Bucks CVS/pharmacykohls 30%coupon codeTHE CHILDREN'S Place的棉衣裤子都好便宜.[求购]Gymboree 20% off coupon code两金了啊 (转载)memory foam pillow 哪里买便宜?Wholefood brown crow 酸奶 (北加24c)Kate Spade Surprise Sale online一直有个疑问,你们怎么整理报纸的coupon的哪里有男士带棉的运动鞋?