S
Sarath
I've two vectors vectorA and vectorB.
I've copy some elements from vectorA to B on satisfying some
conditions. I'd like to avoid for loop and comparison routines. It
would appreciate if there are any stl routines/classes can help on
this matter. I tried using for_each but still passing elements still a
problem.
e.g
stuct Test
{
char name[20];
int nCategory;
}
void Filter( const vector<Test>& vecA, vector<Test>& vecB, char*
pFilter)
{
// compare "name" attribute with "pFilter" and copy on success
}
Thanks in advance.
Regards,
Sarath
I've copy some elements from vectorA to B on satisfying some
conditions. I'd like to avoid for loop and comparison routines. It
would appreciate if there are any stl routines/classes can help on
this matter. I tried using for_each but still passing elements still a
problem.
e.g
stuct Test
{
char name[20];
int nCategory;
}
void Filter( const vector<Test>& vecA, vector<Test>& vecB, char*
pFilter)
{
// compare "name" attribute with "pFilter" and copy on success
}
Thanks in advance.
Regards,
Sarath