I'm trying to overload the operator== from a struct that i have made. I hold the struct's in a std::list -->> list<Record>My_Rec_List;
-----------------------------------------------
Trying to do:
if ( iter == My_Rec_List.front() )
------------------------------------------------
what i have (defined in the struct):
friend bool operator==(Record r, const Record &IN2){
return r.First_number == IN2.First_number;
}
VC++ 6.0 error
--------------------
error C2678: binary '==' : no operator defined which takes a left-hand operand of type 'class std::list<struct Record,class std::allocator<struct Record> >::iterator' (or there is no acceptable conversion)
Error executing cl.exe.