Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » C++ : sorting a vector

Credits go to Arthur Kalliokoski, ImLeftFooted, and Stas B. for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
C++ : sorting a vector
Trent Gamblin
Member #261
April 2000
avatar

It wasn't. My code was wrong, but my point was to let the OP know about stable sorts. Code being wrong doesn't make the purpose of the message wrong. And it is offensive and I think you meant it that way. Why would I post something for no purpose whatsoever? Only an imbecile would do so and that's what your statement implies.

Stas B.
Member #9,615
March 2008

I was not implying anything beyond what I clearly stated, specifically, that your suggestion was wrong and misleading. Arguably, if you don't know how to sort, you are an incompetent programmer, but that's besides the point. Your trouble with A* had nothing to do with stable sorting or with the sort returning a different result every time. That's obviously unlikely if you pass it the same input. It had to do with you failing to read the documentation that describes what your callback should do.

Trent Gamblin
Member #261
April 2000
avatar

Another one to lump with bamccaig.

 1   2   3 


Go to: