c++ - Strange classes error
- Slava Uvarov (30/30) Feb 15 2002 I've found strange error message for the next small piece of code:
- Walter (3/33) Feb 16 2002 You're right, it does look like a bug.
I've found strange error message for the next small piece of code: All other compilers I tested (VC++, gcc, Compaq UNIX cxx) works well. class Outer { class Inner_A { public: Inner_A(); void set(); }; class Inner_B: public Inner_A { public: Inner_B(); void set(); }; }; void Outer::Inner_A::set() {} void Outer::Inner_B::set() { Inner_A::set(); } Inner_A::set(); ^ .............. : Error: no instance of class 'Outer::Inner_A' for member 'Outer::Inner_A::set' --- errorlevel 1 But here 'Outer::Inner_A::set' is only call to base class, it is not instance! Thanks, Slava
Feb 15 2002
You're right, it does look like a bug. "Slava Uvarov" <slavau softcontrol.hu> wrote in message news:a4k7d6$26ja$1 digitaldaemon.com...I've found strange error message for the next small piece of code: All other compilers I tested (VC++, gcc, Compaq UNIX cxx) works well. class Outer { class Inner_A { public: Inner_A(); void set(); }; class Inner_B: public Inner_A { public: Inner_B(); void set(); }; }; void Outer::Inner_A::set() {} void Outer::Inner_B::set() { Inner_A::set(); } Inner_A::set(); ^ .............. : Error: no instance of class 'Outer::Inner_A' for member 'Outer::Inner_A::set' --- errorlevel 1 But here 'Outer::Inner_A::set' is only call to base class, it is not instance! Thanks, Slava
Feb 16 2002