2 Jul
2003
2 Jul
'03
14:55
Hi, just curious, when I tried this trick on function returning referenceg++ failed. Also, when I searched in Google, all examples use functions that return a pointer. class Base { virtual Base& getRef() const = 0; virtual Base* getPtr() const = 0; } class Derived : public Base{ virtual Derived& getRef() const; //This one does not work. virtual Derived* getPtr() const; } Perhaps someone knows the exact definition (standard/ISO) of this -- is reference allowed or only pointer allowed? TIA. -- -- Verdi March --