Mail Archives: djgpp/1997/06/07/22:33:00
From: | Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: yet ANOTHER allegro question... EASY
|
Date: | Sat, 7 Jun 1997 08:39:17 +0100
|
Organization: | None
|
Distribution: | world
|
Message-ID: | <QUSHBDAlARmzEwXS@talula.demon.co.uk>
|
References: | <5n9ohk$ptf$1 AT thor DOT atcon DOT com>
|
NNTP-Posting-Host: | talula.demon.co.uk
|
MIME-Version: | 1.0
|
Lines: | 15
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
SteelGolem writes:
>alleg2.c: In function 'main':
>alleg2.c:13: request for member 'w' in something not a structure or
>union
...
> printf( "width of bmp is %d\n", *bmp.w );
Try bmp->w, or (*bmp).w. In C, the structure member operators (. and ->)
have a higher precedence than the pointer dereference, so your statement
is being evaluated in the wrong order.
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -