From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro, pointers : how do I get line from BITMAP? Date: Fri, 01 Jan 1999 02:58:48 -0800 Organization: Alcyone Systems Lines: 37 Message-ID: <368CAA68.5644E9EA@alcyone.com> References: NNTP-Posting-Host: charmaine.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.0.34 i686) X-Accept-Language: en, eo To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Mikko V.I. Parviainen" wrote: > b->line[y][x] > > Functions well. However, the eight indirections (?) of b > for every cell do add significant overhead, so I tried to > use an alias for b->line, but could not define the > variable. What? I see only three here. > In other words, I am trying to define a variable so that > I could say > > temp[y][x] to access b->line[y][x] > > but cannot find the right expression for temp. > > If you could point me to the right declaration (or some > other solution), I would be mostly thankful. Talking generally (I'm not terribly familiar with Allegro), it sounds like what you want is a "pointer to a structure member," which is not possible in C. In C++ you have pointers to class members, but you still have to reference the class instance when dereferencing them, so that won't do you any good. Define a macro if it's really bothering you. -- Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 Alcyone Systems / irc maxxon (efnet) / finger max AT finger DOT alcyone DOT com San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/ USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE \ / Courage is the fear of being thought a coward. / Horace Smith