clocale
#include <locale>
setlocale(LC_ALL, "en_US.UTF-8");#include <locale>
char* locale = setlocale(LC_ALL, NULL);#include <locale>
#include <iomanip>
double value = 123.456;
std::cout << std::fixed << std::setprecision(2) << value << std::endl; // 123.46#include <locale>
#include <iomanip>
double amount = 1000.0;
std::cout << std::fixed << std::setprecision(2) << std::showpoint << std::setmoneyfmt(std::moneypunct<char>().curr_symbol()) << amount << std::endl; // $1,000.00