http://programmer-toy-box.sblo.jp/article/14267315.html
もしくは、
「C++ Boostのインストール(Windows + VisualC++ 2008編)〜バイナリインストール」
http://programmer-toy-box.sblo.jp/article/27347453.html
でBoostがインストールされていることが前提です。
#include <iostream>
#include <string>
#include <boost/regex.hpp>
using namespace std;
int main() {
boost::regex r6("(\\d)(?=(\\d{3})+(?!\\d))");
string replace6("\\1,");
string str6 = "1234567890";
string res6 = boost::regex_replace(str6, r6, replace6);
cout << res6 << endl;
//"1,234,567,890"になります。
return 0;
}