QSet的问题
#include <QtCore>struct node{ int cx, cy; bool operator < (const node &b) const { return cx < b.cx; }};int main(int argc, char *argv[]){ QCoreApplication app(argc, argv); QSet<node> ss; QSet<node>::iterator iter; node temp; int i, j; for(i=0,j=100;i<101;i++,j--) { temp.cx = i; temp.cy = j; ss.insert(temp); } for(iter=ss.begin();iter!=ss.end();++iter) qDebug() << iter->cx << " " << iter->cy; return 0;}