Original Post
Hi
Who can tell me how to write the for_each?
p1 and p2 are the parameters should send to TEST::doSomething.
class TEST
{
public:
TEST() {};
void doSomething(int a,int b);
};
boost::unordered_map<int,boost::shared_ptr<TEST>> g_map;
int main()
{
int p1=0;
int p2=1;
g_map[0]=boost::make_shared<TEST>();
g_map[1]=boost::make_shared<TEST>();
for_each(g_map.begin(),g_map.end(),how to write?);
returns 0;
}
Who can tell me how to write the for_each?
p1 and p2 are the parameters should send to TEST::doSomething.