I'm in a C++ class right now, and i need some help

we're learning about vectors...

and we need to know if in a list, of say 3, or 4... can you sort from a certain point, and end at a certain point, instead of just from the begining and end

any help would be appriciated :cheesy:

yes --

vector<string> names;
//
// assumes there are more than 4 names in the vector
sort(names.begin()+1, names.end()-2);
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.