功能转换 [英] function conversion
问题描述
我知道在stdlib.h中有很多函数可以执行从
string转换为int,double ecc。
但我不明白是否有一些标准功能可以执行
转换来自
int,double ecc to string
>
谢谢。
Hi,
I know there are in stdlib.h many functions to perform conversion from
string to int, double ecc.
but I don''t understand if there are some standards function to perform
conversion from
int, double ecc to string
Thanks.
推荐答案
xdevel写道:
xdevel wrote:
我知道在stdlib.h中有很多函数可以执行转换从
string到int,double ecc。
但我不明白是否有一些标准功能可以执行
转换从
int,double ecc到string
Hi,
I know there are in stdlib.h many functions to perform conversion from
string to int, double ecc.
but I don''t understand if there are some standards function to perform
conversion from
int, double ecc to string
我会使用stdio.h中的sprintf(或snprintf)
I would use sprintf (or snprintf) from stdio.h
>
谢谢。
>
Thanks.
-
Pietro Cerutti
PGP公钥:
http://gahr.ch/pgp
On 2 Lug,15:23,Pietro Cerutti< g ... @ gahr.chwrote:
On 2 Lug, 15:23, Pietro Cerutti <g...@gahr.chwrote:
xdevel写道:
xdevel wrote:
Hi,
我知道在stdlib.h中有很多函数可以执行转换从
string到int,double ecc。
但我不明白是否有一些标准功能可以执行
转换来自
int,double ecc to string
I know there are in stdlib.h many functions to perform conversion from
string to int, double ecc.
but I don''t understand if there are some standards function to perform
conversion from
int, double ecc to string
我会使用stdio.h中的sprintf(或snprintf)
I would use sprintf (or snprintf) from stdio.h
谢谢。
Thanks.
-
Pietro Cerutti
PGP公钥: http://gahr.ch/pgp
是的,但我希望知道是否存在标准的一对一功能。
我读到了itoa不是!
Yes, but I wish to know if there are standard "one-to-one" functions.
I read that i.e. itoa is not!
" xdevel" < xd ******** @ gmail.comwrote in message
news:11 ********************* @ g4g2000hsf.googlegrou ps.com ...
"xdevel" <xd********@gmail.comwrote in message
news:11*********************@g4g2000hsf.googlegrou ps.com...
我知道stdlib.h中有很多函数可以执行转换从
string到int,double ecc。
但我不明白是否有一些标准功能可以执行
转换从
int,double ecc到string
Hi,
I know there are in stdlib.h many functions to perform conversion from
string to int, double ecc.
but I don''t understand if there are some standards function to perform
conversion from
int, double ecc to string
''sprintf()''就像''printf()'',除了输出
是一个字符串而不是stdout。
(小心确保你的字符串很大
足以容纳输出)。
-Mike
''sprintf()'' works like ''printf()'', except the output
is to a string instead of stdout.
(Be careful to ensure that your strings are large
enough to hold the output).
-Mike
这篇关于功能转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!