E
eric
hello
i compile the following code in MSVC++6:
map < string, ostringstream > smap;
smap["key1"] << "val1";
smap["key2"] << "val2";
map < string, ostringstream >::const_iterator i;
for (i = smap.begin();
i!= smap.end(); i++)
cout << i->first << "|" << i->second.str() << endl;
i expect it to output:
key1|val1
key2|val2
in fact the output is:
key1|
key2|
what am i doing wrong?
thanks
eric
i compile the following code in MSVC++6:
map < string, ostringstream > smap;
smap["key1"] << "val1";
smap["key2"] << "val2";
map < string, ostringstream >::const_iterator i;
for (i = smap.begin();
i!= smap.end(); i++)
cout << i->first << "|" << i->second.str() << endl;
i expect it to output:
key1|val1
key2|val2
in fact the output is:
key1|
key2|
what am i doing wrong?
thanks
eric