Message-Id: <199808092219.XAA22672@sable.ox.ac.uk> Comments: Authenticated sender is From: George Foot To: Endlisnis Date: Sun, 9 Aug 1998 23:18:06 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Text and graphics? Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Precedence: bulk On 9 Aug 98 at 15:54, Endlisnis wrote: > Nate Eldredge wrote: > > > Einar wrote: > > What the hey? `scanf' is for reading, not writing, so obviously you > > can't write anything using it. Furthermore, it's unlikely to work right > > in a graphics mode; you'll have to use Allegro's features for that. > > As long as you are in an 8bbp mode, printf should work fine. Personally I'd rather not rely on it. It's unpredictable where the text will be printed, and you don't have as much control. > > If you want to put text on the screen, try `sprintf' followed by > > `textout'. > > Why not just a printf, or cout? Why call 2 functions when you only need > to call one? `textout' is more powerful, e.g. it can use various fonts and colours and can put the text at a specific location on the screen. In any case, Allegro provides a function (`textprintf') that does a `sprintf' followed by a `textout' for you. -- george DOT foot AT merton DOT oxford DOT ac DOT uk