Very much a noob here, so it\'s best to assume I know nothing in any answers.
I\'ve been writing a little app, and it\'s working well, but readability is a nightmare
Try the numpunct facet and overload the do_thousands_sep function. There is an example. I also hacked up something that just solves your problem:
#include <locale>
#include <iostream>
class my_numpunct: public std::numpunct<char> {
std::string do_grouping() const { return "\3"; }
};
int main() {
std::locale nl(std::locale(), new my_numpunct);
std::cout.imbue(nl);
std::cout << 1000000 << "\n"; // does not use thousands' separators
std::cout.imbue(std::locale());
std::cout << 1000000 << "\n"; // uses thousands' separators
}