Original Post
Okay, i gotta a class, i gotta subclass, and somewhere else theres this function that returns a pointer to the superclass. But maybe sometimes the thing thats getting returned is the subclass. And maybe where its getting returned to could be either. And funnily enough it dosent work. class shape class square : public shape class bag square *thing; shape* getshape() { return thing; } } main() { bag one; square two; two = one.getshape(); } Should it work? can it work? Any suggestions would be much appreciated. Cheers