Hi,
I have a loop in the form
// map transactions;
cilk_for (map::iterator transactions_it=transactions.begin(); transactions_it != transactions.end(); transactions_it++)
{
temp_str=(*transactions_it).first;
}
I get the following error:
In member function ?void cilk Item_Support_Generator::create_pairs()?:
125: error: no match for ?operator-? in ?loop bound - transactions_it?
125: error: No operator-(const std::_Rb_tree_iterator, std::allocator >, int> >, std::_Rb_tree_iterator, std::allocator >, int> >) for Cilk for loop control variable
I know the problem is due to the fact that maps do not support random access iterators,
and the cilk programming guide asks us to define a method for operator-.
I am not sure what exactly that means.
Has it got something to do with custom iterators?
Any pointersabouthow to define this operatorwould be helpful. Thanks.


