123456
int scoreN = 1; SDL_Surface *Score = NULL; Score = TTF_RenderText_Solid( regfont, scoreN ,blackc); SDL_BlitSurface(Score,NULL,screen,&cords); SDL_FreeSurface(Score);
const char *
123456789101112
int SCORE = 1; string scoreN; ostringstream convert; convert << SCORE; scoreN = convert.str(); SDL_Surface *Score = NULL; Score = TTF_RenderText_Solid( regfont, scoreN ,blackc); SDL_BlitSurface(Score,NULL,screen,&cords); SDL_FreeSurface(Score);
1234567891011121314
int SCORE = 1; string scoreN1; ostringstream convert; convert << SCORE; scoreN1 = convert.str(); const char * scoreN = scoreN1.c_str(); SDL_Surface *Score = NULL; Score = TTF_RenderText_Solid( regfont, scoreN ,blackc); SDL_BlitSurface(Score,NULL,screen,&cords); SDL_FreeSurface(Score);