471,599 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Lookup in std::map<string,string> doesn't work

// --
using namespace std;

map<string,string> formMap;
list<string> formParams;

for(list<string>::iterator fit = formParams.begin();
fit!=formParams.end(); fit++) {
cout << "key=" << *fit;
cout << ",value=" << *fit << endl;

This outputs:

But, formMap["f_name"] is an empty string! (like all the entries in

What am I doing wrong?
formMap[*formParams.begin()] is an empty string too by the way.


- gipsy boy
Jul 22 '05 #1
1 6504
gipsy boy wrote:

Oops..I suppose this could be a problem, since the order of arguments
isn't explicately defined in standard c++..
sorry, think it'll work without this

gips boy
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marcelo Pinto | last post: by
19 posts views Thread by Erik Wikström | last post: by
4 posts views Thread by lada77 | last post: by
13 posts views Thread by liujiaping | last post: by
42 posts views Thread by barcaroller | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.