c 语言 int 转 string

itoa并不是一个标准的C函数,它是Windows特有的,如果要写跨平台的程序,请用sprintf。是Windows平台下扩展的,标准库中有sprintf,功能比这个更强,用法跟printf类似:

char str[255];
sprintf(str, "%x", 100); //将100转为16进制表示的字符串。

https://blog.csdn.net/p312011150/article/details/81273888

posted @ 2022-11-08 15:39  zkx98  阅读(79)  评论(0编辑  收藏  举报