#include <vector>
#include <string>
#include <algorithm>
using namespace std;
//can't use reference arg
//bool Filter( const wstring& s, const wstring& pattern )
bool Filter( const wstring s, const wstring pattern )
{
return wstring::npos != s.find( pattern );
}
void main()
{
vector<wstring> vec;
vec.push_back( L"AAA" );
vec.push_back( L"BBB" );
vec.push_back( L"CCC" );
remove_if( vec.begin(), vec.end(), bind2nd( ptr_fun(Filter), L"C" ) );
}