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啊
相关阅读
转gymbucks,jcp的certificate,kohls cashmarsmission你的JCP凉鞋还是pending shipment吗?kitchenaid mixer 的 pasta attachmentCvs的空气加湿器摆在店里什么地方?staples电池,今天买了,下周还能买吗?gerber奶票便宜转圣诞节前逛街有没有大折扣啊?JCP 家的gift certificate能转别人用不?有会激光打印机灌粉的同学吗,介绍下 经验对了,SFW有10 off 2enfamil 胖可加临近年关多病啊cvs一次transaction可以用2张奶票吗我想说,那个ibotta$5 GAP giftcard with the Gyft App白菜价两盒哈根达斯,如果拿到RA送的免费3刀UPR这个更狠贡献一个KOHLS 30%off code[出售]wine rebate forms nprq[合集] 发个打回国的电话卡deal今天CVS遇到一新手小二