Mail Archives: djgpp/1997/03/02/10:56:02
| From: | aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
|
| Newsgroups: | comp.os.msdos.djgpp
|
| Subject: | Re: Type casting problems with gcc
|
| Date: | Sun, 02 Mar 1997 14:34:36 GMT
|
| Organization: | Southwest Missouri State University
|
| Lines: | 15
|
| Message-ID: | <33198f78.2795996@ursa.smsu.edu>
|
| References: | <5f9trv$e6t AT crl9 DOT crl DOT com>
|
| NNTP-Posting-Host: | forseti.i94.smsu.edu
|
| To: | djgpp AT delorie DOT com
|
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On 1 Mar 1997 10:51:43 -0800, sammy AT crl DOT com (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;
Is there some reason you can't declare bmp as type (BITMAP *)? This makes
accessing the structure fields much easier:
BITMAP *bmp = create_bitmap(320,200);
int bitmapwidth = bmp -> w;
- Raw text -