Std::sorthttp://forum.devmaster.net/t/std-sort/5372
Hello, can please someone explain the way to use the std::sort-algorithm!
Well, I have a self-defined struct: MyStruct and a vector\\<MyStruct\>, and now i want to sort this vector with the std::sort-template-function! But i never used template-functions before with their weird declaration!
So please help me!
Ps: it's important that i can implement my own compare-function, i think this is possible with std::sort isn't it ?!
Wed, 08 Oct 2003 13:54:54 +0000general devStd::sortno-reply@example.com (@Extrawurst Extrawurst)@Extrawurst wrote:

okay i got it now, i didn't read the explanations carefully the first time

Okay, thanks it seems to be quite easy, but one last question! is it right that the third parameter of std::sort has to be the overloaded "()"-operator getting two pointers of its class and compare them ?

Hello, can please someone explain the way to use the std::sort-algorithm! Well, I have a self-defined struct: MyStruct and a vector\, and now i want to sort this vector with the std::sort-template-function! But i never used template-functions before with their weird declaration! So please help me!

Ps: it's important that i can implement my own compare-function, i think this is possible with std::sort isn't it ?!