Date: Mon, 9 Mar 1998 15:48:38 -0800 (PST) Message-Id: <199803092348.PAA11478@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "Andreas 'LionKing' Tscharner" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Allegro-GUI-Problem Precedence: bulk At 12:50 3/8/1998 +0100, Andreas 'LionKing' Tscharner wrote: >-----BEGIN PGP SIGNED MESSAGE----- > >Hello World, > >I have the following problem: > >DIALOG *MyDialog; > >MyDialog = new DIALOG[n]; >MyDialog[0] = {d_shadow_box_proc, x, .....}; > >The compiler says "Parse error before '{'". What's the problem? How do I >fix it? Flame me if I'm wrong, but I don't think you can initialize a dynamic struct like that. In fact, I don't think standard C/C++ lets you do it at all. Either you can initialize it one field at a time: MyDialog[0].foo = d_shadow_box_proc; MyDialog[0].bar = x; Or you can use a GNU extension (see info node "Constructor Expressions"): MyDialog[0] = ((DIALOG) {d_shadow_box_proc, x, ...}); Hope this helps. Nate Eldredge eldredge AT ap DOT net