[comp.lang.c++] returning this from virtual functions.

helz@ec.ecn.purdue.edu (Randall A Helzerman) (01/23/91)

A quick question about returning this from virtual functions. 
A virtual function was defined to return a pointer to the base class.
Instead I return this.

I have gotten it to compile with no errors in g++, but it gives me a warning
in cfront.  

Could some net.guru++ tell me if this is an acceptable thing to do?
If not, how would I return a pointer to the derived class in a virtual
function, without casting to a void pointer?

Many thanks in advance.