itoa()函数

itoa()函数

itoa():char *itoa( int value, char *string,int radix);

原型说明:

value:欲转换的数据。
string:目标字符串的地址。
radix:转换后的进制数,可以是10进制、16进制等,范围必须在 2-36。

#include<iostream>
#include<string>
using namespace std;

int main()
{
int i=1024;

char a[100]={0};

for(int j=2;j<=36;j++)
{
_itoa_s(i,a,j);
cout<<a<<endl;
}

system("pause");
return 0;
}

参考文档:http://blog.csdn.net/lanzhihui_10086/article/details/39960027

原文地址:https://www.cnblogs.com/lhwblog/p/6435345.html