Please tell me , "how can i convert float or double to String" kindly help me or tell me some algorithm
Printable View
Please tell me , "how can i convert float or double to String" kindly help me or tell me some algorithm
char str[20];
sprintf(str, "%f", 3.14);
***
I like feedback, so please rate my answer.
i want a algorithm to convert float to string not the syntax like it.
thank u for ur help
Ok, I don't think the way floating point numbers are stored in memory is standard. Different compilers etc would or can use different schemes to handle/store floating point values. That's at least true with Standard C (ISO 9899:1990). For C++, I don't really know.
***
I like feedback, so please rate my answer.