1

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.

string s;
vector<string> vec;
map<string, int> row;
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,

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by Grunt
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.