Sorting Question

create a function named firstNameSortIndex that takes one argument
a dynamic array of structs of type StudentRecord and returns the sorting index array according first name.
Then print the array according to this index
No.

This is very easy homework. Try it yourself, and we will help you get it right.

But no one here is interested in doing it for you. We figured it out ourselves ages ago.
one argument -- a dynamic array

That says "one", but probably means logical one rather than literal one.

It can really be one:
foo( const std::vector<StudentRecord>& records )
but also two:
foo( const StudentRecord * records, size_t N )
hey thanx for the motivation and help, i figured it it it was just bubble sorting with arrays.
Topic archived. No new replies allowed.