how do i display numbers in graphics mode?

I'm currently making a program where i need to show the scores at the top right screen. But the thing is I'm using graphics and I cannot use outttextxy(x,y,number) . So, does anyone know a function to display scores in graphics mode???


thnx in advance
Can you be more specific why you cannot use outtextxy(), have you declared the environment before hand, what are you passing to the function?
outtextxy expects a string to output so why not just converting your number to a string?
Could you explain how to do that?

do you mean:

(assuming num = 32)

char temp_num[5] = num;

Is this how, because i completely don't understand that


@popa6200, outtextxy does not allow me to display a number
outtextxy(300,300, 7);

i have to do this:
outtextxy(300,300, "7");


With itoa it's quite simple:
1
2
3
4
5
int num = 32;
char buffer[16] = {0};
itoa(num, buffer, 10);

outtextxy(300, 300, buffer);


http://www.cplusplus.com/reference/cstdlib/itoa/
Topic archived. No new replies allowed.