示例代码: #include iostream int main () { int i = 8600 ; char p [ 128 ]; _itoa_s ( i , p , 128 , 10 ); std::cout "整形转换字符数组:" p std::endl ; } 运行效果: win mac ubuntu
示例代码:
#include <iostream>
int main()
{
int i = 8600;
char p[128];
_itoa_s(i, p,128, 10);
std::cout << "整形转换字符数组:" << p << std::endl;
}
运行效果:
win
mac
ubuntu