posible bug with access to derived class data
Mike Stump
mrs@wrs.com
Mon Aug 10 09:00:00 GMT 1998
> Date: Sun, 9 Aug 1998 22:59:59 -0400 (EDT)
> From: Peter J Abeles <pja@andrew.cmu.edu>
> To: egcs-bugs@cygnus.com
> I am trying to access a public data member class map in the class
> UniverseHandler which is a derived class. another derived class has
> a public data member also called map. So I need to specify I want
> the map from UniverseHandler. In gcc and metrowerks this code works
> just fine and I checked with some books and with several other
> people and they agree with me that this should work
> MapClass *foo = &(UniverseHandler::map);
If you want a pointer to member function from &(UniverseHandler::map),
this isn't C++. In C++ you would need to write &UniverseHandler::map.
If you don't want one, then I don't understand the types well enough
to comment.
More information about the Gcc-bugs
mailing list