how do I write that for a class X?
I'm gonna use qSort.
don't work.Qt Code:
bool X::operator<(const X& a) { return number < a.number;}To copy to clipboard, switch view to plain text mode
/usr/include/qt4/QtCore/qalgorithms.h:118: error: passing `const X' as
`this' argument of `bool X:perator<(const X&)' discards
qualifiers
Bookmarks