std::set<std::string> tradedSymbolSet;
//..
// tradedSymbols is filled
//..
std::set<std::string> symbols;
//...
// symbols is filled
//..
std::set_difference(tradedSymbolSet.begin(), tradedSymbolSet.end(),
symbols.begin(), symbols.end(), diffSet.begin());
我得到這個編譯錯誤:我得到編譯錯誤,而使用set_difference
"error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const std::basic_string<_Elem,_Traits,_Alloc>' (or there is no acceptable conversion)"
抱怨set_difference功能的使用。我不能讓
你忘了#包括? –
Bathsheba
@Bathsheba:它包含在內。 – xyzt
'diffSet'' const'? –