奇怪的C++语法SectionConsumer::SectionConsumer (Decoder* d, Section* s) : Consumer(d)

jasonCSH 2006-04-24 03:22:08
class SectionConsumer : public Consumer
{
....
public:
SectionConsumer (Decoder*, Section*);
...
}


SectionConsumer::SectionConsumer (Decoder* d, Section* s) : Consumer(d)
{
}
SectionConsumer是类SectionConsumer的构造函数.
Consumer是SectionConsumer的基类的构造函数.

"SectionConsumer::SectionConsumer (Decoder* d, Section* s) : Consumer(d)"
是不是在构造类的时候,调用基类的构造函数,初始化Decoder d?


...全文
125 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,100

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧