Mail Archives: djgpp/2000/02/22/22:27:15
hello once again,
Now that I have begin exploring the wonderful world of Allegro GUI functions,
I have come across a slight problem. The Allegro GUI example program, EX13.C
(which is located in C:\DJGPP\ALLEGRO\EXAMPLES for me) compiles n' links and
runs perfectly. However, if I change its name to EX13.CPP (or anything.cpp
for that matter), I get the following error at every occurrence of the
d_button_proc function when I try to compile:
Error: initialization to "void *" from "const char *" discards qualifiers.
For example, a program with the .CPP extention containing the following
dialog would compile fine
DIALOG main_dialog[] =
{ d_clear_proc, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, NULL, NULL, NULL },
NULL, (blah blah
blah...........................................................) }
};
but a dialog with d_button_proc won't
DIALOG main_dialog[] =
{ d_clear_proc, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, NULL, NULL, NULL },
d_button_proc, numbers
numbers......................................... },
NULL, blah blah
blah........................................................... }
};
It would seem that I need to typecast something here, as is the case with
many C/C++ compatability issues, but I don't know what - pleez help!
-Kevin
- Raw text -