I have a map where I\'d like to perform a call on every data type object member function. I yet know how to do this on any sequence but, is it possible to do it on an associativ
For fellow programmers who stumble upon this question from google, there is a good way using boost.
Explained here : Is it possible to use boost::foreach with std::map?
Real example for your convenience :
// typedef in include, given here for info :
typedef std::map Wt::WEnvironment::CookieMap
Wt::WEnvironment::CookieMap cookie_map = environment.cookies();
BOOST_FOREACH( const Wt::WEnvironment::CookieMap::value_type &cookie, cookie_map )
{
std::cout << "cookie : " << cookie.first << " = " << cookie.second << endl;
}
enjoy.