it has problems with the line iter=data.begin(), with error no operator found which takes a right-hand operand of type 'std::_List_const_iterator<_Mylist>' (or there is no acceptable conversion)
The iterator works fine in main, with no problems, but when I try to use it in the friend function the problems begin.