728x90 AdSpace

Latest Article



Converting integer to string in C++ Coco2d -x Example





Converting integer to string in C++  here is example function that convert integer score into string This function use in Coco2d updating the score in game.
void  MyClass:updateScore(int score)
 {
  const int labelLength = 100;
  char scoreLabelText[labelLength];
  sprintf(scoreLabelText, labelLength, "Score: %d", score);
  __pScoreLabel->setString(scoreLabelText);
 }

no image
  • Title : Converting integer to string in C++ Coco2d -x Example
  • Posted by :
  • Date : 10:51
  • Labels :






  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment