Horje
str remove char c++ Code Example
removing a character from a string in c++
#include<iostream>
#include<algorithm>

using namespace std;
main() {
   string my_str = "ABAABACCABA";

   cout << "Initial string: " << my_str << endl;

   my_str.erase(remove(my_str.begin(), my_str.end(), 'A'), my_str.end()); //remove A from string
   cout << "Final string: " << my_str;
}
str remove char c++
static  void StrRemoveChar(std::string& s1, char l)
{
  s1.erase(std::remove(s1.begin(), s1.end(), l), s1.end());
}




Cpp

Related
c++ double is nan Code Example c++ double is nan Code Example
c++ set comparator Code Example c++ set comparator Code Example
count bits c++ Code Example count bits c++ Code Example
See Compilation Time in c++ Program Code Example See Compilation Time in c++ Program Code Example
c++ base constructor Code Example c++ base constructor Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9