Thanks for your reply. Sorry for the syntax errors above.
Here's a more complete version:
static const Item* somefunc(const name* p1, const char* var)
const Item* p = 0;
name::const_iterator e = p1->end();
for (i=p1->begin(); i<e ++i)
if (stricmp(i->func(), var) == 0)
p = i;
Someone else wrote the code and I'm trying to fix it...