Re: operator < with a "set"
The only thing I see that stands out is your operator < declaration does not return a bool.
HTH,
chris
Re: operator < with a "set"
I've added the return boolean but I still get this error. I'm not exactly sure how this operator works. Shouldn't I be doing some logic in the operator function..Like a compare or something..
HELP!!!
c:\program files\microsoft visual studio\vc98\include\functional(86) : error C2678: binary '<' : no operator defined which takes a left-hand operand of type 'const class FileToCopy' (or there is no acceptable conversion)
c:\program files\microsoft visual studio\vc98\include\functional(86) : while compiling class-template member function 'bool __thiscall std::less<class FileToCopy>::operator ()(const class FileToCopy &,const class FileToCopy &) const'
// TEMPLATE STRUCT less
template<class _Ty>
struct less : binary_function<_Ty, _Ty, bool> {
bool operator()(const _Ty& _X, const _Ty& _Y) const
{return (_X < _Y); }
};
This is where the error ends up.
Thanks
Re: operator < with a "set"
two guesses:
1) try using CX::operator <(const CX& x)const
or
2) try an external friend operator
bool operator <(const CX& lhs, const CX& rhs);