I'm just curious if anyone knows if there is a ready made function in C++ to sort (numerically or alphabetically) multiple arrays based on a particular array?

i.e. Imagine you have multiple arrays or a multi-dimentional array containing data about users (name, age, etc.)

Is there a function that for example can sort it by name, and automatically shift the age so they still correspond to the correct user name?

cant think of an allready existing function... but if you have multiple arrays, use a bubble sort and apply the swop you are doing to both arrays instead of just one?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.