| delorie.com/archives/browse.cgi | search |
| Message-ID: | <00de01bdb684$5d2cd740$604d08c3@arthur> |
| Reply-To: | "Arthur" <arfa AT clara DOT net> |
| From: | "Arthur" <arfa AT clara DOT net> |
| To: | "DJGPP Mailing List" <djgpp AT delorie DOT com> |
| Subject: | Re: Loading a BMP picture??? |
| Date: | Thu, 23 Jul 1998 22:34:48 +0100 |
| MIME-Version: | 1.0 |
>int main()
>{
> BITMAP *b;
> PALETTE p;
>
> b = load_bitmap("backgr.bmp", p);
> if (!b)
> {
[snip]
Watch out. load_bitmap returns NULL if it can't load the file. NULL is not
strictly the same as 0, so you should really check for if(b == NULL){...}
instead of if(!b){...}
James Arthur
jaa AT arfa DOT clara DOT net
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |