The FooStruct has an integer variable called "Position" and some other variables. Now i would like to sort my fooVector in order of the FooStruct->Position.
Maybe it is also important to know, that Position is not always unique, same positions could occur over several FooStructs.
Is this possible to do? Or do i have to use something other than a vector for such a use-case?
There's some useful advice here. Real-world problems can require sorting on multiple fields, perhaps with some ascending, others descending. Flexible approaches to sorting are definitely useful.