Subj : Re: Help... I don't understand one compile error... To : borland.public.cppbuilder.language.cpp,borland.public.cpp.borlandcpp From : "Ed Mulroy [TeamB]" Date : Tue Apr 13 2004 11:22 pm > std::string str = "io non so cosa fare"; > str.erase(std::remove(str.begin(), str.end(), ' '), str.end()); What are you trying to do with that? std::remove is a standard C/C++ library function that takes a const char* string and deletes a file. It is the equivalent of unlink. It is not an algorithm. That line of code will not work with any C++ compiler. You have posted your C++ Builder question here in the newsgroups for the old Borland C++ compiler. C++ Builder newsgroups have the word 'cppbuilder' in their name. Please post C++ Builder questions in C++ Builder newsgroups. Follow ups set to: borland.public.cppbuilder.language.cpp .. Ed > Checco wrote in message > news:opr31r3abo91d5fa@newsgroups.borland.com... > > I need to adapt a project developped with DEV-C++ with > gnu g++, into > Borland C++ builder 5.0 but I'm in trouble with one error... > The follow code... > > #include > #include > #include > > //-------------------------------------------------------------------- ------ > - > #pragma hdrstop > //-------------------------------------------------------------------- ------ > - > #pragma argsused > int main(int argc, char* argv[]) > { > std::string str = "io non so cosa fare"; > str.erase(std::remove(str.begin(), str.end(), ' '), str.end()); > std::cout << str << std::endl; > > system("pause"); > return 0; > } > //-------------------------------------------------------------------- ------ > > works correctelly with GNU g++ 3.2 and reply with: > iononsocosafare > Premere un tasto per continuare... > ... but it doesn't work with Borland c++ Builder 5.0 > > I recive the follow errors ... > > [C++ Error] Unit1.cpp(15): E2227 Extra parameter in call to > std::remove(const char *) > [C++ Error] Unit1.cpp(15): E2285 Could not find a match for > '_STL::string::erase(int,char *)' .