<分区>
Possible Duplicate:
C++ convert int and string to char*
你好,我正在制作一个游戏,里面有一个计分板。分数存储在一个 int 变量中,但我用于游戏的库需要一个字符数组来为我的记分牌输出文本。
那么如何将 int 转换为 char 数组?
int score = 1234; // this stores the current score
dbText( 100,100, need_the_score_here_but_has_to_be_a_char_array);
// this function takes in X, Y cords and the text to output via a char array
我使用的库是 DarkGDK。
tyvm :)