// Use multiple inheritance. We want
// both a string and an Object:
class MyString: public string, public Object {
public:
~MyString() {
cout << "deleting string: " << *this << endl;
}
MyString(string s) : string(s) {}
};
string(s)
上記のコードの意味がわかりません。string
実際に呼び出される変数はありませんが、なぜ機能するのでしょうか?