我正在尝试使用 allegro 运行以下代码。
textout_ex(屏幕、字体、numbComments 、100、100、绿色、黑色);
numbComments 是一个整数,这个函数的函数原型是
void textout_ex(BITMAP *bmp, const FONT *f, const char *s,
int x, int y, int color, int bg);
根据我的理解,我不能在第三位传递这个整数。
因此,我需要将整数转换为 char*s。
请帮忙?
当然,我不能更改实际的函数原型