Topic: operator overloading [] with derived classes
Author: gu24522@uxa.cso.uiuc.edu (Gennady Ushman )
Date: Wed, 16 Sep 1992 02:18:35 GMT Raw View
Like, how do I do this? If I have the & operator[] defined in the base class,
how do I access the array elements from the derived classes. Each array is
allocated by the base class constructor when the object of the derived class
is created. There are a series of virtual functions defined in the base class
that are redefined within the derived classes and that must access the arrays
defined by the base class. Does anyone know how to do this?
Author: pjl@sparc10.cs.uiuc.edu (Paul Lucas)
Date: Wed, 16 Sep 1992 14:35:27 GMT Raw View
In <BunFr0.EoF@news.cso.uiuc.edu> gu24522@uxa.cso.uiuc.edu (Gennady Ushman ) writes:
*****> This question does not beong in comp.std.c++; rather comp.lang.c++.
I've added that to the newsgroups; if you respond, delete comp.std.c++
from the line.
>Like, how do I do this? If I have the & operator[] defined in the base class,
>how do I access the array elements from the derived classes. Each array is
>allocated by the base class constructor when the object of the derived class
>is created. There are a series of virtual functions defined in the base class
>that are redefined within the derived classes and that must access the arrays
>defined by the base class. Does anyone know how to do this?
*****> That aside, I don't understand what's going on...include code
fragments next time.
--
- Paul J. Lucas University of Illinois
AT&T Bell Laboratories at Urbana-Champaign
Naperville, IL pjl@cs.uiuc.edu