单项选择题

有如下程序: #include #include using namespace std; class Animal{ public: virtual string GetType() const { return "Animal"; } virtual string GetVoice() const { return "Voice"; } }; class Dog:public Animal{ public: string GetType() const { return "Dog"; } string GetVoice() const { return "Woof"; } }; class Cat:public Animal{ public: string GetType() const { return "Cat"; } string GetVoice() const { return "Miaow"; } }; void Type(Animal& a) { cout<
A.DogspeakVoice-CatspeakVoice
B.DogspeakWoof-CatspeakMiaow
C.AnimalspeakVoice-AnimalspeakVoice
D.AnimalspeakWoof-AnimalspeakMiaow