🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

show a variable on the screen?

Started by
12 comments, last by da_cobra 22 years, 7 months ago
Btw, the problem with your previous post was that you forgot to include the ellipses in your parameter list:
int PrintText(char *text, int x, int y, int bR, int bG, int bB, int tR, int tG, int tB, ...  ); 


The ellispes (the three dots) are necessary.
Advertisement
ah ellipses are 3 dots :D
sorry didn''t know that (I''m dutch)

I just thought you meant with that "the rest of the variables in the function"

thanx anyway
The way *I* would do it USING YOUR FUNCTION....

char numstr[100];
sprintf(numstr,"%d",yournumber);
PrintText(numstr, 0, 0, 0, 0, 0, 255, 255, 255) ;
quote: Original post by Ibanez
sprintf(numstr,"%d",yournumber);

It works, but has the unfortunate side effect of requiring you to know the appropriate format string for every variable. That''s why I switched to streambuffers (and I love them!)

This topic is closed to new replies.

Advertisement