Sort object in a list

I want to write a function to sort object in a list (don't use STL at all), but I don't know how to use loop in this case. Please help me
Last edited on
here you'll find a tutorial on how loops work:
http://www.cplusplus.com/doc/tutorial/control/

and i suggest to start with an easy algorithm, like bubblesort:
http://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Bubble_sort
but the list is different from array
Elements can be swapped, given suitable iterators.
Topic archived. No new replies allowed.