first allegro program
Mar 15, 2014 at 5:14am UTC
the program runs just fine everything goes as it should but i get a warning in my messages. it says this...
[Warning] passing NULL used for non-pointer converting 6 of `int al_show_native_message_box(ALLEGRO_DISPLAY*, const char*, const char*, const char*, const char*, int)'
and this is my code. what exactly does this mean?
all i am doing is making a window and destroying it.
1 2 3 4 5 6 7 8 9 10 11 12
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;
if (!al_init())
{
al_show_native_message_box(NULL, NULL, NULL, "Failed to initialize allegro!" , NULL, NULL);
return -1;
}
Last edited on Mar 15, 2014 at 5:14am UTC
Mar 15, 2014 at 6:27am UTC
Last parameter is an int, not a pointer. So compiler warns you about possible accidental code. What does last parameter means? If you need it to be 0, make it 0, not NULL
Mar 15, 2014 at 6:48pm UTC
cool. thanks a lot. changed it to 0 and the warning went away. :)
Topic archived. No new replies allowed.