-
Help with Allegro....
Hey....
I am trying to use the textout function to print a string and an int var....but it doesn't work.
eg.
string VarName = "Test Text"
int VarNum = 100;
textout(screen,font,VarName,X,Y,C);
textout(screen,font,VarNum,X1,Y1,C);
How do you print vars???
-
You have to format a string yourself
char buff[100];
sprintf( buff, "Test text %d %d", X, Y );
textout(screen,font,buff,X,Y);
-
textout probably suspects a c style string. So use
VarName.c_str();
as long as it's parameter is const char*