100. 有如下程序:
#include<iostream>
#include<string>
using namespace std;
class Instrument{
public:
Instrument(string t, string n):type(t),name(n) { }
virtual string GetType() const { return type; }
virtual string GetName() const { return name; }
protected:
string type, name;
};
class Piano:public Instrument{
public:
Piano(string n="AB",string t="CD"):Instrument(n,t) { }
string GetType() const { return type; }
string GetName() const { return "YZ"; }
};
int main(){
const Instrument &pi=Piano();
cout<<pi.GetType()<<'-'<<pi.GetName();
return 0;
}
运行时的输出结果是______。