KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I' d like to use lexical_cast to convert a float to a string. Usually it works fine, but I have some problems with numbers without decimal. How can I fix number of decimal shown in the string? Example: double n=5; string number; number = boost::lexical_cast<string>(n); Result number is 5 , I need number 5.00 .
Tags (comma-separated)
Save Edits
Cancel