home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / std / cplus / 1192 < prev    next >
Encoding:
Text File  |  1992-09-15  |  882 b   |  18 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!gu24522
  3. From: gu24522@uxa.cso.uiuc.edu (Gennady Ushman )
  4. Subject: operator overloading [] with derived classes
  5. Message-ID: <BunFr0.EoF@news.cso.uiuc.edu>
  6. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  7. Organization: University of Illinois at Urbana
  8. Date: Wed, 16 Sep 1992 02:18:35 GMT
  9. Lines: 7
  10.  
  11. Like, how do I do this? If I have the & operator[] defined in the base class,
  12. how do I access the array elements from the derived classes. Each array is
  13. allocated by the base class constructor when the object of the derived class
  14. is created. There are a series of virtual functions defined in the base class
  15. that are redefined within the derived classes and that must access the arrays
  16. defined by the base class. Does anyone know how to do this?
  17.  
  18.