Hi All,
Please pardon my posting this here. The MS V C++ forumn is not accessible now.
I am getting this error on compiling ErrorType.cpp:
errortype.cpp(43) : error C2678: binary '<' : no operator found which
takes a left-hand operand of type 'const ErrorType' (or there is no
acceptable conversion)
Here is the portion of code:
bool ErrorType:perator<(const ErrorType& right)
{
if((priority < right.priority)||
(priority == right.priority &&
timestamp < right.timestamp)||
(priority == right.priority &&
timestamp == right.timestamp &&
errorCode < right.errorCode))
return true;
else
return false;
}
bool ErrorType:perator>(const ErrorType& right)
{
return right < *this; //line 43
}
I will appreciate any assistance.
Chike.
Please pardon my posting this here. The MS V C++ forumn is not accessible now.
I am getting this error on compiling ErrorType.cpp:
errortype.cpp(43) : error C2678: binary '<' : no operator found which
takes a left-hand operand of type 'const ErrorType' (or there is no
acceptable conversion)
Here is the portion of code:
bool ErrorType:perator<(const ErrorType& right)
{
if((priority < right.priority)||
(priority == right.priority &&
timestamp < right.timestamp)||
(priority == right.priority &&
timestamp == right.timestamp &&
errorCode < right.errorCode))
return true;
else
return false;
}
bool ErrorType:perator>(const ErrorType& right)
{
return right < *this; //line 43
}
I will appreciate any assistance.
Chike.