| | |
<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 |
* ansi array asterisks binarysearch calculate changingto char character cm convert copyanyfile copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createprocess() database feet fflush fgets file floatingpointvalidation fork forloop function givemetehcodez global grade gtkwinlinux hacking histogram homework i/o inches infiniteloop input interest intmain() iso kernel keyboard kilometer km linked linkedlist linux locate looping loopinsideloop. lowest match meter microsoft mqqueue number oddnumber odf open opendocumentformat openwebfoundation owf pattern pdf performance posix power probleminc process program programming pyramidusingturboccodes radix read recv recvblocked research reversing scanf segmentationfault sequential single socket socketprograming socketprogramming standard string suggestions systemcall threads turboc unix urboc user variable voidmain() wab whythiscodecausesegmentationfault win32api windowsapi





