|
蓝森林 http://www.lslnet.com 2006年8月16日 14:08
|
|
RH7.2怎么没有itoa这个函数?
|
|
有什么替代的吗?
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
snprintf/sprintf
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
if you are using in c++, you can use std::streamstring
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
谢谢你!
搞定了!
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
谢谢你!
能否给个简单的小例子?
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
char a[12];
int i = 78;
sprintf(a,"%d",i);
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
std::stringstream buf;
int i=10;
buf<<a;
_____________
std::string a;
buf>>a;
或者直接使用buf.str();
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
谢谢!
搞定了!
|
|
|
Re: RH7.2怎么没有itoa这个函数?
|
|
多谢!
|
|