You are supposed to do it with the locale library.
Mostly copied from https://en.cppreference.com/w/cpp/io/manip/put_money like so:
#include <iomanip>#include <iostream>#include <locale>int main() { long double val = 239.9; std::cout.imbue(std::locale("en_US.UTF-8")); std::cout << std::showbase<< "en_US: " << std::put_money(val)<< std::endl; return 0;}