int to char
2010-09-05 19:24
239 查看
#include <stdlib.h>
int i = 12;
char* num_char = new char[29];
itoa(i,num_char,10); //第三个参数是 10, 表示十进制数
结果保存在 num_char 里。
int i = 12;
char* num_char = new char[29];
itoa(i,num_char,10); //第三个参数是 10, 表示十进制数
结果保存在 num_char 里。
相关文章推荐
- int to char* and char* to int
- error: cast from ‘char*’ to ‘int’ loses precision
- cannot convert from 'const int' to 'const char *'
- char* inttoalpha( int value, char *string, int radix ) // 接口仿照库函数, radix 是基数:2进制,8,10,16 。
- incompatible pointer types assigning to 'int *' from 'char'
- int to SAFE_CHAR
- 6410_io_drv.c: error: invalid operands to binary << (have 'char *' and 'int') 错误处理
- atoi char and string to int
- char to int
- 类似Build Error: #513: a value of type "int" cannot be assigned to an entity of type "char *"
- error: cast from ‘char*’ to ‘int’ loses precision
- [Algorithms, C] long2char: 自己用C写来玩玩的整形转化为字符串函数 (递归和迭代两种实现): void long2char(long from, char *to, int n);
- 整型转字符串(convert int to char)优化实践——一个意外的BUG
- 【笔记】编译报错error: cannot convert ‘main(int, char**)::sockadrr*’ to ‘const sockaddr*’ for
- InttoChar
- Type conversion - unsigned to signed int/char
- keil(MDK)中出现error: #513: a value of type "int" cannot be assigned to an entity of type "char *",即函数返
- 【C编程练习】2013华为校园招聘机试题9月10日题1:把整数转换成字符串 void ConvertIntToStr(int nVal, char* pStr);
- error: cast from ‘char*’ to ‘int’ loses precision
- undefine reference to'qMain(int,char**)'