Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert double to string

Status
Not open for further replies.

Maurader

Technical User
May 8, 2002
59
CA
How do I convert a double to a string?
 
Here is the prototype for it.

char *_gcvt( double value, int digits, char *buffer );

Shouldn't be too hard to figure out. Just make sure to include <stdlib.h>.

-Skatanic
 
You should check out sprintf(), too...

Here's the prototype:
Code:
int sprintf( char *buffer, const char *format [, argument] ... );
Where *buffer is usually just an array of char (like
Code:
char temp[255]
), *format is a string that looks like this &quot;%e&quot;...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top