help with C++

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2006
Posts: 1
Reputation: biggymacdaddy13 is an unknown quantity at this point 
Solved Threads: 0
biggymacdaddy13's Avatar
biggymacdaddy13 biggymacdaddy13 is offline Offline
Newbie Poster

help with C++

 
0
  #1
Jan 12th, 2006
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:
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,662
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1502
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: help with C++

 
0
  #2
Jan 12th, 2006
yes --
  1. vector<string> names;
  2. //
  3. // assumes there are more than 4 names in the vector
  4. sort(names.begin()+1, names.end()-2);
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1042 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC