944,066 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1171
  • C++ RSS
Jan 12th, 2006
0

help with C++

Expand Post »
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:
Reputation Points: 10
Solved Threads: 0
Newbie Poster
biggymacdaddy13 is offline Offline
1 posts
since Jan 2006
Jan 12th, 2006
0

Re: help with C++

yes --
C++ Syntax (Toggle Plain Text)
  1. vector<string> names;
  2. //
  3. // assumes there are more than 4 names in the vector
  4. sort(names.begin()+1, names.end()-2);
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,954 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: To create contact manager using doubly linked list(c++)
Next Thread in C++ Forum Timeline: What is bloodshed dev cpp





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC