Path: utzoo!attcan!uunet!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!eewee.enet.dec.com!heintze From: heintze.peewee.enet.dec.com (Sieg Heintze) Newsgroups: comp.lang.c++ Subject: Overloading [] to read and write to a bit array Summary: wanted: Example of using [] to access bit array and VGA Video Memory Keywords: bit, array, c++, [] Message-ID: <13053@shlump.nac.dec.com> Date: 3 Jul 90 16:35:31 GMT Sender: newsdaemon@shlump.nac.dec.com Organization: Digital Equipment Corporation Lines: 19 Can someone provide an example of overloading the [] operator to read as well as write to a bit array? There is a problem with writing to the bit array because your inclined to write a function of type &bit. Of course this doesn't work. Actually, what I really want is to access my VGA video memory with the [] operater. This would actually be a two dimensional array of 4 bit entities (nibbles). Currrently, we have to do some pretty low level stuff everytime we have to access this video memory. If C++ truly is OOP, we should be able to hide these ugly idiosynchrousies (sp?) inside the [] operator. Sieg heintze@genral.enet.dec.com Digital Equipment Corporation 1110 Chapel Hills Drive CXN2-2/35 Colorado Springs, CO 80920-3995 719-260-2184