www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/23/17:36:56

Sender: nate AT cartsys DOT com
Message-ID: <36D32C76.799CE7DD@cartsys.com>
Date: Tue, 23 Feb 1999 14:32:22 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.1 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Using the Dialogs -help!! please
References: <19990223103655 DOT 01136 DOT 00001843 AT ng-ce1 DOT aol DOT com>
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019