Hi all, I want to use replace_if to replace carrige return line feeds from a string and I'm trying to set up a predicate here's what I've got -
template<class _Ty> class InSequence : public std::binary_function<_Ty, const char*, bool> { bool operator()(const _Ty& _X, const char* _Y) { return true; /* removed for brevity */ } }; std::string HitchHiker("So long and thanks for all the fish"); std::replace_if( HitchHiker.begin(), HitchHiker.end(), std::bind2nd( InSequence<char>(), "abc"), '$' ); but it don't compile - firstly what parameter should the template be _Ty ? and is this an optimal solution? Regards, Robert Rolls **********************************************************************" This correspondence is for the named person's use only. It may contain confidential or legally privileged information or both. " No confidentiality or privilege is waived or lost by any " mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Vodafone. This email has been checked for viruses. ********************************************************************************************** You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.