奇怪的C++语法SectionConsumer::SectionConsumer (Decoder* d, Section* s) : Consumer(d)
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?