avanderlaan
Programmer
- Jul 11, 2002
- 156
I'm looking for a function like "sprintf" in C that creates string representations of numeric values according to a user-defined specification. For example
floating point: sprintf( string, "%1.5f", aFloat ) produces ".12345" where aFloat = 0.123451234512345...
scientific notation: sprintf(string, "%1.5e", aFloat ) produces 1.23451e-1
Thanx.
floating point: sprintf( string, "%1.5f", aFloat ) produces ".12345" where aFloat = 0.123451234512345...
scientific notation: sprintf(string, "%1.5e", aFloat ) produces 1.23451e-1
Thanx.