cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Sort object in a list
Sort object in a list
Nov 25, 2009 at 4:52pm UTC
Progesco
(23)
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
Nov 26, 2009 at 5:16pm UTC
Nov 25, 2009 at 9:08pm UTC
AleaIactaEst
(98)
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
Nov 26, 2009 at 5:16pm UTC
Progesco
(23)
but the list is different from array
Nov 26, 2009 at 5:30pm UTC
kbw
(9488)
Elements can be swapped, given suitable iterators.
Topic archived. No new replies allowed.