F***Q 发帖数: 6599 | 1 在Unix上那个函数功能跟dos的itoa()类似,把一个数变成串?
我用fcvt/ecvt,cc总是报错:
"ptest.cpp", line 77.15: 1540-276: (S) Assignment to a
constant expression is not allowed.
请问应该怎么用?
多谢! | I**********s 发帖数: 441 | 2 If you check C reference book you can find many ways to do
this, I think.
One way currently I'm using is sprintf function:
char intString[20];
int n = 10;
sprintf(intString, "%d", n);
then you can use intString other places. |
|