SDL Problem, Please Help

Hi, SDL beginner over here

I started out using SDL and so far I have been able to Build tictactoe and Hangman.
I thought my next project will be BlackJack - the problem is I don't know how to Diplay specific numbers on the screen as TTF_RenderText_Solid() renders constants and arrays but not intergers

ofcourse I can create an If....Else block for each possible number but that would take too much time

My Game Scope is that the player bids a number and I want to display the amount which he has put on the table and I want to display the amount left with him.

Any Help Is Appreciated.



Last edited on
Create a string from the number.
http://www.cplusplus.com/reference/string/to_string/

If for some reason you can't use to_string() (happened to me on MinGW 4.7) you can use sprintf()
http://www.cplusplus.com/reference/cstdio/sprintf/
Thank You Man
Im Back On Track
Topic archived. No new replies allowed.