|
Boost Users : |
From: chun ping wang (cablepuff_at_[hidden])
Date: 2007-09-20 13:54:53
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_at_[hidden]> 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.<http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net