Morea
10th May 2006, 01:18
how do I write that for a class X?
I'm gonna use qSort.
bool X::operator<(const X& a)
{
return number < a.number;}
don't work.
/usr/include/qt4/QtCore/qalgorithms.h:118: error: passing `const X' as
`this' argument of `bool X::operator<(const X&)' discards
qualifiers
I'm gonna use qSort.
bool X::operator<(const X& a)
{
return number < a.number;}
don't work.
/usr/include/qt4/QtCore/qalgorithms.h:118: error: passing `const X' as
`this' argument of `bool X::operator<(const X&)' discards
qualifiers