Witam mam przerobioną z innego tematu funkcję programu, który ma usuwać element wektora. Wygląda on następująco:
case '8':
{
string nazw;
cout << "Podaj nazwisko studenta, ktorego chcesz usunac: ";
cin >> nazw;
remove_if(lista.begin(), lista.end(), [&](Student &usun) { return usun.nazwisko = nazw; });
break;
}
struct Student
{
string imie;
string nazwisko;
int ocena;
};
Błąd wygląda następująco:
Error C2675 unary '!': 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' does not define this operator or a conversion to a type acceptable to the predefined operator
Może ktoś wyjaśnić co trzeba tutaj poprawić?