class Animal { string name; public: Animal(string name="na"):name(name) { } }; class Cat:public Animal { int runSpeed; public: Cat(string na,int speed=0); }; 使用初始化表的方式实现Cat的构造函数的写法是______。
A.
Cat(string na,int speed=0):Animal(na),runSpeed(speed){}
B.
Cat(string na,int speed):Animal(na),runSpeed(speed){}
C.
Cat(string na,int speed): { Animal(na),runSpeed(speed);}
D.
Cat(string na,int speed){name=na;runSpeed=speed;}