cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
map question
map question
May 18, 2011 at 3:57pm UTC
teppel
(14)
Hi all, i got a question
map<string, Student>student_list;
if i use student_list.find("321456");
i only get back a iteration and proof that the record exist if it really exist.
Is there anyway to get the position on studentID = 321456 located at instead using a iteration for loop ? Something that work similar charAt() function ?
May 18, 2011 at 5:16pm UTC
kooth
(746)
Find returns an iterator. You get the key out with iterator.first, and the mapped item with iterator.second.
Topic archived. No new replies allowed.