[aclug-L] Re: C question: double to string?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Brian Chapman wrote:
>
> Larry Bottorff wrote:
> >
> > Let's say I've got a double dnum = 10.55993 and I want to convert this
> > number to a char array, i.e, just the opposite of atof() so each digit
> > is put in a char in the array. How might I do such a thing?
> >
> > Larry Bottorff
> >
> > -- This is the discussion@xxxxxxxxx list. To unsubscribe,
> > visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
>
> now your thinking too hard! ;-)
>
> sprintf (buffer, "%f", number);
Sometimes the easiest things are the hardest.
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
|
|