【发布时间】:2011-04-17 23:35:46
【问题描述】:
你好,我正在制作一个游戏,里面有一个记分板。分数存储在一个 int 变量中,但我用于游戏的库需要一个字符数组来输出我的记分牌的文本。
那么我如何将一个 int 变成一个字符数组呢?
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 :)
【问题讨论】:
标签: c++ arrays casting types char