selection sort

June 22, 2010 at 13:47:36
Specs: Windows 7
parameters: array of pointers, length of an array

sort the array of pointers so that the strings they point to are in alphabetical order by first name

See More: selection sort

Report •

June 22, 2010 at 13:50:04
Awesome. When you get past the, "Have people on the Internet do my homework for free" stage, let us know.

If you start doing your homework yourself, but run into problems, feel free to ask us. Make sure to include the code you're having problems with.

If you prefer to have the Internet to do your homework, well, that's an option, too.

Report •

June 22, 2010 at 14:36:49
void sortPointers( string * a[], int size){

for ( int i = 0; i < length - 1; i++){
for (int j = i +1, minPos = i: j < length; j++)

if (data[j] < data[minPos] minPos =j;
temp = data[i];
data[i] = data[minPos];
data[minPos] = temp;

Report •

June 22, 2010 at 14:46:56
if (data[j] < data[minPos] minPos =j;
You're missing a right parentheses.

Report •

Related Solutions

June 22, 2010 at 15:10:33
declaring an array of pointer to string, which way is correct:

char * arrayofstrings[];


string *arrayofstrings[];

Report •

June 22, 2010 at 15:22:57
char * arrayofstrings[];
This is an array of pointers to chars. Possibly cstrings.

string *arrayofstrings[];
This is an array of pointers to string objects.

Report •

July 3, 2010 at 19:53:53
should I declare minPos in the second for loop, or the first forloop

Report •

Ask Question