From-SVN: r32214
This commit is contained in:
Jason Merrill 2000-02-27 02:00:35 -05:00
parent 1ab83276ed
commit 6aede56787
2 changed files with 3 additions and 3 deletions

View File

@ -23,8 +23,8 @@ class multiple : public bar_1, public bar_2 {
public:
multiple(int i1, int i2) : bar_1(i1), bar_2(i2) {}
void print() {
cout << "bar_1::k -> " << bar_1::k << "\n";
cout << "bar_2::k -> " << bar_2::k << "\n";
cout << "bar_1::k -> " << ((bar_1 *)this)->k << "\n";
cout << "bar_2::k -> " << ((bar_2 *)this)->k << "\n";
cout << "bar_1::get_k() -> " << bar_1::get_k() << "\n";
cout << "bar_2::get_k() -> " << bar_2::get_k() << "\n";
}

View File

@ -26,7 +26,7 @@ class base3: public base {};
class derived: public base3, public base1, public base2 {
public:
int d_data;
derived( int i ) { d_data = i; base3::b_data++; }
derived( int i ) { d_data = i; ((base3 *)this)->b_data++; }
void d_print() { }
};