Mail Archives: djgpp/1999/01/01/09:21:45
"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
- Raw text -