How can I print Integers with TextOut?
score=50;
char buffer[16]; // Make it large enough to hold any number you want to print
sprintf(buffer, "%i", score);
TextOut(hDC, 50, 50, buffer, sizeof(buffer));
Hope that helps.
Dirk "Scarab" Gerrits
''If knowledge is power, than to be unknown is to be unconquerable.''
- Unknown Romulan Centurion
char buffer[16]; // Make it large enough to hold any number you want to print
sprintf(buffer, "%i", score);
TextOut(hDC, 50, 50, buffer, sizeof(buffer));
Hope that helps.
Dirk "Scarab" Gerrits
''If knowledge is power, than to be unknown is to be unconquerable.''
- Unknown Romulan Centurion
Go with the one Scarab0 made, it''s nicer.
-
The other one is good when calculating and stuff.
-
The other one is good when calculating and stuff.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement