【发布时间】:2020-06-18 14:40:15
【问题描述】:
DrawText 的第一个参数必须是 const(char)*,但我尝试使用 to!为此并失败了:(
yVel = to!(string)(player.vel.y);
DrawText(yVel, player.pos.x, player.pos.y - 40, 20, RAYWHITE);
如何正确地从 float 转换为 const(char)* ?
【问题讨论】:
标签: string d char-pointer