Boost

正規表現を使ってみる

Debianではlibboost-devとlibboost-regex-devパッケージをインストールしておきます。 #include <boost/regex.hpp> #include <string> #include <iostream> using namespace boost; using namespace std; int main(){ regex re("<(.*?)>"); const string source = "<tag>body</tag>"; const string format =</iostream></string></boost/regex.hpp>…

Boost C++を使ってみる

DebianにはBoostもパッケージとして提供されているので簡単にインストールできます。バージョンはちょっと古いかもですが(お約束)。 # apt-get install libboost-dev正規表現やスレッドなどは別パッケージになっているので必要に応じてインストールしておき…