I've been trying to overload the operator, so I can use a class for a priority_queue, thus far i have:
Code:
In function `bool operator<(const Thread&, const Thread&)':
71: passing `const Thread' as `this' argument of `int Thread::getreq()'
discards qualifiers
71: passing `const Thread' as `this' argument of `int Thread::getreq()'
discards qualifiers
and my attempt at overloading is:
Code:
bool operator<(const Thread &a, const Thread &b)
{
bool result = a.getreq() < b.getreq();
return result;
}
Now, checking out the other threads on here, there were one or two that were similar to what was going on with my stuff, but it seems that what worked for others, didn't really do anyhting for me