| | |
<map> find function
Thread Solved |
•
•
Join Date: Oct 2005
Posts: 22
Reputation:
Solved Threads: 0
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.
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,
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.
C Syntax (Toggle Plain Text)
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,
![]() |
Similar Threads
- what function can delete a space in a string? (C)
- Warning: Unknown(): Unable to call () - function does not exist in Unknown on line 0 (PHP)
- interactive maps? is this possible mambo/php (PHP)
- Problem with find (Python)
- sorting stl::map (C++)
- Find function (C++)
- use of "find" in the algorithm function (C)
Other Threads in the C Forum
- Previous Thread: char ** s = new[], char s[i] = new [], for (i < size) delete [] s[i] = Segfault
- Next Thread: whats wrong with my code cant display result
| Thread Tools | Search this Thread |
* adobe ansi api array arrays binarysearch calculate centimeter char character cm convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory dynamic fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hardware highest homework i/o ide inches intmain() iso km license linked linkedlist linux linuxsegmentationfault list logical_drives loopinsideloop. lowest match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation pattern pdf performance pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprogramming stack standard strchr string suggestions test unix urboc user variable voidmain() whythiscodecausesegmentationfault win32api windows.h windowsapi





