January 23rd, 2014, 11:06 PM
Converting int to std::string using istringstream inserts commas
So I have a following function that converts int to string however it inserts the commas for thousands, millions, and so on. e.g. 65432 -> "65,432".
How do I make the conversion but have a string without commas?
I know it has to with locale but I cannot find it how to prevent it. Also I know about std::stoi() and atoi() but I do not want them.
Here is the code and thank you.
template <typename T>
std::string NumberToString ( T Number )
ss << Number;
Tags for this Thread
Click Here to Expand Forum to Full Width