Convert float -> char*

E

ern

Anybody know the Linux equivalent (or even better some C standard
equivalent) for _gcvt() ? I want my float to become a char*. Thanks!
 
A

Artie Gold

ern said:
Anybody know the Linux equivalent (or even better some C standard
equivalent) for _gcvt() ? I want my float to become a char*. Thanks!
The standard way is to use sprintf() or, likely better, snprintf()
(standard in C99).

BTW - have you read the FAQ?

HTH,
--ag
 
R

Randy Howard

ern wrote
(in article
Yes I know, but I've tried for a few hours now and I can't find what
I'm looking for.

You tried for 2 hours to type in "comp.lang.c FAQ" and failed?


You might want to try something other than programming as a
career.
 
K

Keith Thompson

ern said:
Yes I know, but I've tried for a few hours now and I can't find what
I'm looking for.

Remarkable.

Google "C FAQ"; it's the first hit.
 

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

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top