This will not return a string but an iterator to the matching string. Your code would look something like this.
bool Comparer : public std::binary_function<wchar_t*, wchar_t*,bool>
{
public:
bool operator()(const wchar_t* s1, const wchar_t* s2) const
{
return (wcscmp(s1, s2) == 0);
}
};
std::vector<wchar_t*> paths;
std::vector<wchar_t*>::const_iterator it;
it = std::find_if(paths.begin(), paths.end(), std::bind2nd(Comparer(), L"some string"));
if (it != paths.end())
{
/*Found it*
const wchar_t* sz = *it;
}
...
Pax Domini sit semper vobiscum