Mail Archives: djgpp/1997/03/01/23:12:16
Samuel McGrath wrote:
>
> I'm using the Allegro graphics library right now, and I'm trying to
> reference the w and h fields of the BITMAP structure like this:
>
> void* bmp = create_bitmap(320,200);
> int bitmapwidth = (BITMAP*)(bmp)->w;
Try: int bitmapwidth = ((BITMAP *) bmp)->w;
I'm at a loss for why you can't just declare it the proper type to begin
with, though... if you post the code that includes such a construct I'd
be glad to try to show you a better way to achieve what you're trying to
do. :)
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better! This time, you're going all the way down...|
---------------------------------------------------------------------
- Raw text -