need a good C++ sorting function - please help!

edited February 2006 in Internet & Media
I am working on an assignment in C++. The instructor suggests that you find and modify an already written sort function. The problem is we need to sort 3 different arrays:

1 int array
1 float array
1 string array

I can't seem to find a good sort function that can also sort strings, the primitive data types are fine. So basically I need some sort of sort function that can be easily modified into a function template that will accept int, float, or string arrays. Can anyone help me out?


Thanks in advance

Comments

  • MiracleManSMiracleManS Chambersburg, PA Icrontian
    edited February 2006
    Be careful anytime you use BubbleSort, some of the ones floating around out there are evil at best. And usually don't work like BubbleSort should, which is the case with most of the sorts there.
Sign In or Register to comment.