Mail Archives: djgpp/1997/06/07/08:08:53
SteelGolem (myork AT auracom DOT com) wrote:
: it gives me an error:
: alleg2.c: In function 'main':
: alleg2.c:13: request for member 'w' in something not a structure or
: union
...
: BITMAP *bmp;
...
: printf( "width of bmp is %d\n", *bmp.w );
The compiler is reading this as *(bmp.w), and bmp is a pointer not a
struct. What you should write is either (*bmp).w or the clearer bmp->w,
which have the same effect.
--
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford
- Raw text -