Search vector of structs
问题 I'm trying to find a string within in a vector of structs. But I keep getting an error, the error message is way too long so Ill upload it externally. A part of it is "error: no match for 'operator==' (operand types are 'char' and 'const std::__cxx11::basic_string') { return *__it == _M_value; }" The code Im currently using is: struct constants { std::string name, lastname; float salary=0; }; void searchPerson(const std::vector<constants> &search) { using namespace std; vector<constants>name;