I get this error: c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\bits\stl_algo.h|4412|error: no match for'operator==' in '__first.__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = char*, _Container = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]() == __value'|
Sorry it was an std::string.
I ended up writing my own function anyway, it only took a couple of minutes and then I didn't need to worry about casting.