class _node {vector<_node> *dirlist;...};_node* _node::Contains(CString Name){ vector<_node>::iterator i; if (Name=="") return NULL; if (dirlist==NULL) return NULL; if (dirlist!=NULL) for (i=dirlist->begin(); i!=dirlist->end(); i++) if (i->name.CompareNoCase(Name)==0) return &((*dirlist).at(l)); return NULL;}
if (dirlist!=NULL) for (i=dirlist->begin(); i!=dirlist->end(); i++) if (i->name.CompareNoCase(Name)==0) return &((*dirlist).at(l));
typedef vector<_node> node_container;node_container dirlist;class FindByName{ CString name;public: FindByName(const CString& str) : name(str) {} bool operator()(const _node& node) { return name.CompareNoCase(node.name) == 0; }}_node* _node::Contains(CString Name){ node_container::iterator i = find(dirlist.begin(), dirlist.end(), FindByName(Name)); if( i != dirlist.end() ) return &(*i); return NULL;}