here is the method of class TrainingProgram. Program_list is the list of strings. This method checks if the given string is already in program_list or not. I get such an error: . C:\Users\admin\Desktop\Documents\C\training_functions.cpp|559|error: 'struct std::_List_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >' has no member named 'compare'|
Any help? Thanks in advence
bool TrainingProgram::trainingProgram_isExercise(string exercise)
{
for (it3 = program_list.begin(); it3 != program_list.end(); ++it3)
{
if (it3.compare(exercise) == 0) //error in that line
return true;
}
return false;
}