蒼い夏の空のライブラリー

ブログ名は適当に考えました  このブログの記事のすべてはCC0、パブリックドメインです

2019-01-01から1ヶ月間の記事一覧

std::string を空白で分割する

C++

std::sregex_token_iterator を使う 例として、 双方向連結リスト | アルゴリズムとデータ構造 | Aizu Online Judge をやった #include <iostream> #include <list> #include <string> #include <regex> #include <algorithm> class my_list : public std::list<int> { std::regex m_separator{" "}; // 分割</int></algorithm></regex></string></list></iostream>…