M
Moah, full time turnip.
Hi,
I'm currently using Borland C++ Builder on an application using the STL,
and it generates warnings I don't know how to handle:
"[C++ Warning] Unit1.cpp(585): W8091 Argument template, _InputIter sent
to 'for_each' is an output iterator: input iterator required
Complete Analyzer Context:
Unit1.cpp(574): analysis :, void TForm1::UpdateDBListBox()"
(rougly translated from the french).
Here's the code:
{
multiset<DBCard, CardCompare> List;
for_each(List.begin(), List.end(), AddItem);
}
(Actually everywhere I use a for_each on a multi set).
I've looked at the SGI doc on iterators, for_each and multiset but I
must admit I feel none the wiser.
What do I do wrong, and how do it write, please?
Thanks,
Moah, full time turnip.
I'm currently using Borland C++ Builder on an application using the STL,
and it generates warnings I don't know how to handle:
"[C++ Warning] Unit1.cpp(585): W8091 Argument template, _InputIter sent
to 'for_each' is an output iterator: input iterator required
Complete Analyzer Context:
Unit1.cpp(574): analysis :, void TForm1::UpdateDBListBox()"
(rougly translated from the french).
Here's the code:
{
multiset<DBCard, CardCompare> List;
for_each(List.begin(), List.end(), AddItem);
}
(Actually everywhere I use a for_each on a multi set).
I've looked at the SGI doc on iterators, for_each and multiset but I
must admit I feel none the wiser.
What do I do wrong, and how do it write, please?
Thanks,
Moah, full time turnip.