私はを持っていて、std::vector<std::string> temp_results
std :: for_eachを使用してこのベクトルを調べ、文字列を連結したいので、次の構造を作成しました。
std::stringstream ss;
std::string res = std::for_each(temp_results.begin(), temp_results.end(), boost::bind(addup, _1, ss));
std::string addup(std::string str, std::stringstream ss)
{
ss << str;
ss << ";";
return ss.str;
}
次のエラーが発生しますが、これは私の理解を超えています。
error C2475: 'std::basic_stringstream<_Elem,_Traits,_Alloc>::str' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Alloc=std::allocator<char>
]
誰かが何が悪いのか説明してもらえますか?