using BOOST_FOREACH with created map requires you to use typedef first.

std::map<std::string, int> my_map;
..insert some stuff.
typedef std::pair<std::string, int> strintpair;
BOOST_FOREACH(strintpair si, my_map)
{
    std::cout << si.first << " " << si.second << "\n";
}

from the boost documentation.
 
map<int,
int> next = boost::assign::
map_list_of(1
,2)(2
,3)(3
,4)(4
,5)(5
,6);


On 9/20/07, swapna < swapna0282@yahoo.co.in> wrote:
hi,
 
Does anone know how to use map_list_of and the BOOST_foreach with the created map.
 
 
Thanks
Swapna


Forgot the famous last words? Access your message archive online. Click here.


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users