Article ID: 120961 - Last Review: November 21, 2006 - Revision: 3.1 HOWTO: How to Sort a CStringArray in MFCThis article was previously published under Q120961 On This PageSUMMARY
You can use the sample code in this article to sort a CStringArray object.
The main() function constructs a CStringArray object, adds elements to it,
prints out the elements, calls the sort() member function to sort it, and
then prints the sorted elements. The sort() function uses the Bubble Sort
algorithm to sort the array and calls the CompareAndSwap() function to
compare each string and swap them if necessary.
MORE INFORMATIONSample CodeAPPLIES TO
| Article Translations
|

Back to the top
