954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

help with C++

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:

biggymacdaddy13
Newbie Poster
1 post since Jan 2006
Reputation Points: 10
Solved Threads: 0
 

yes --

vector<string> names;
//
// assumes there are more than 4 names in the vector
sort(names.begin()+1, names.end()-2);
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You