Mail Archives: djgpp/1999/02/23/17:36:56
Et1850 wrote:
>
> the code:
>
> #include <stdlib.h>
> #include <stdio.h>
> #include "allegro.h"
> PALLETE my_pallete;
> const BITMAP *scry;
>
> DIALOG the_dialog[] =
> {
> { d_clear_proc, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0,
> NULL },
> { d_icon_proc, 2, 2, 32, 32, 255, 9, 0, 0, 0, 0,
> scry},
> the error:
> (11) Error: initializer element for 'the_dialog[1].dp' is not constant
The compiler is right, as usual. `scry' is a variable and hence you
cannot initialize with it. You'll have to do it at run time; add
the_dialog[1].dp = scry;
before you call the dialog box routine.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -