0
私はブーストライブラリのstring_ref find関数が何をしているかを理解する際にいくつかの問題を抱えています。私は私が見つけることが私に私のパターンとfind_last_ofの最後の出現を与える理由は、まったく意味がありません理解していない次のプログラムBoost :: string_refアルゴリズムを見つける
int main(int argc, char **argv) {
boost::string_ref ref = string("<a>\n1234567\n</a>\n<a>");
cout << ref.find_first_of("<a>") << endl; // output 12
cout << ref.find("<a>") << endl; // output 17
}
を書きました!誰かが私に助けを与えることができますか? docsから
「boost :: string_ref ref =」 \ n1234567 \ n \ n 「;」と書かれていた場合、文字列リテラルは決して「破棄される」ため、 –