944,082 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Marked Solved
  • Views: 4520
  • C RSS
Sep 1st, 2006
1

<map> find function

Expand Post »
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,
Similar Threads
Reputation Points: 44
Solved Threads: 0
Newbie Poster
kimw is offline Offline
22 posts
since Oct 2005
Sep 1st, 2006
0

Re: <map> find function

Reputation Points: 197
Solved Threads: 12
Junior Poster
Grunt is offline Offline
147 posts
since Jul 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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:





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


Follow us on Twitter


© 2011 DaniWeb® LLC