Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » String Output

This thread is locked; no one can reply to it. rss feed Print
String Output
gary_ramsgate
Member #8,619
May 2007

Hi there,

A very simple question, one which I've spent about an hour trying to work out.
What is the correct approach for outputing the string below to the screen using Allegro.

I take it I would need to use textout_ex ???

I.E

#include<string>

score=123456;
name="Gary";

textout_ex ??????

Thanks in advance.

Kibiz0r
Member #6,203
September 2005
avatar

No, textprintf_ex().

textprintf_ex(buffer, font, x, y, col, bg, "%s's score: %i", name.c_str(), score);

gary_ramsgate
Member #8,619
May 2007

Many thanks, works a treat :):):)

Go to: