To: dano AT dynaguy DOT demon DOT nl Cc: djgpp AT delorie DOT com Subject: Re: trouble compiling Message-ID: <19980629.110718.7759.0.zixyer@juno.com> References: <6n749v$sqr$1 AT fir DOT prod DOT itd DOT earthlink DOT net> <899120399 DOT 11131 DOT 0 DOT spot DOT c3ade179 AT news DOT demon DOT nl> From: zixyer AT juno DOT com (Zixyer S Qwerty) Date: Mon, 29 Jun 1998 12:05:29 EDT Precedence: bulk On Mon, 29 Jun 1998 13:34:49 +0200 "Daniel Fauré" writes: >> >>int main() >>{ >> >> allegro_init(); >> set_color_depth(8); >> set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); >> text_mode(0); >> char *c; >> int p; >> p=3; >> itoa(p, c, 10); // call frame traceback here >> >> textout(screen, FONT, c, 10, 10, 15); // parse error before ',' >here >>} > >Well... this should be quite obvious, FONT should be font, FONT is the >struct, used to declare for example the default "font". As for the >other >error... I don't get it. This piece of code compiles fine, then >displays "3" >and returns to my IDE without too much trouble. Sorry, can't help you >there. > >Daniel Faure > it should be obvious what the problem is here, c is never initialized, so it's pointing to some random place (since it's an automatic variable). generally in protected mode, any efforts to write to c would result in a crash. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]