This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: posible bug with access to derived class data


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]