Extrawurst
10-07-2003, 01:49 PM
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 ?!
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 ?!