Fortran decimal and thousand separator
问题 Is there a way to change the period decimal separator for a comma?. Also, how can I make the output numbers have a thousand separator?. This could be a comma, a period, a space ... 回答1: You can write a C++ function which will convert the number in a string in you current locale for you. #include <string> #include <iomanip> #include <sstream> class SpaceSeparator: public std::numpunct<char> { public: SpaceSeparator(std::size_t refs): std::numpunct<char>(refs) {} protected: char do_thousands