<map> find function

Thread Solved

Join Date: Oct 2005
Posts: 22
Reputation: kimw is an unknown quantity at this point 
Solved Threads: 0
kimw kimw is offline Offline
Newbie Poster

<map> find function

 
1
  #1
Sep 1st, 2006
i am a little bit confused about the actual usage of the find function of map

i have say a vector<string> and i want to return the relative position (or iterator) of a key (of type string) in this vector.

now, the find function accepts only one input which is the key.

  1. string s;
  2. vector<string> vec;
  3. map<string, int> row;
  4. row.find(s);

how do i actually use this function? shouldnt the find accepts two inputs (one for the key, one for the vector to search for) .. ive looked up in google but found no solution yet

any help is appreciated
regards,
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 147
Reputation: Grunt has a spectacular aura about Grunt has a spectacular aura about 
Solved Threads: 12
Grunt's Avatar
Grunt Grunt is offline Offline
Junior Poster

Re: <map> find function

 
0
  #2
Sep 1st, 2006
The key to eliminating bugs from your code is learning from your mistakes.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC