2011-10-10から1日間の記事一覧

数字混じり文字列のソートをBoost.Xpressiveで

元ネタはここ(http://ja.doukaku.org/295/)なんですが、 札幌C++勉強会で扱ったのでちょっとやってみる。方針は比較関数で文字列と数値に分けて、それぞれの場合で処理を分けてるだけ。 #include<iostream> #include<string> #include<vector> #include<fstream> #include<boost/lexical_cast.hpp> #include<boost/xpressive/xpressive.hpp> #include<boost/xpressive/regex_actions.hpp> str</boost/xpressive/regex_actions.hpp></boost/xpressive/xpressive.hpp></boost/lexical_cast.hpp></fstream></vector></string></iostream>…