what are the reverse functions of atof( ), atoi( ) and atol( ) ?

S

Sharon

hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string
thx!
 
I

Irrwahn Grausewitz

Sharon said:
hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string
thx!

Look up sprintf in your reference manual.

HTH
Regards
 
M

Martin Ambuhl

Sharon said:
hi all

what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string

sprintf.
For the hundredth time.
Didn't you guess that you are not the first person to ask this? That this
might even be a Frequently Asked Question? What does that suggest to you?
 
C

CBFalconer

Sharon said:
what are the reverse functions of atof( ), atoi( ) and atol( ) ?
I want to change sth to string

How about:

char whatzit[] = "sth";

and, in place of atof, atoi, atol consider using strtol, strtod,
etc. The inverse operations are usually performed by sprintf.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top