Answers for "how to read a string without a specific character c++"

C++
3

delete one specific character in string C++

#include <algorithm>
str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());
Posted by: Guest on September-24-2020
4

index string c++

#include <string>
#include <iostream>

int main(){
  //index string by using brackets []
  std::string string = "Hello, World!";
  //assign variable to string index
  char stringindex = string[2];
  
}
Posted by: Guest on June-15-2020
0

c++ read each char of string

std::string str = ???;
for(std::string::iterator it = str.begin(); it != str.end(); ++it) {
    do_things_with(*it);
}
Posted by: Guest on November-12-2020

Code answers related to "how to read a string without a specific character c++"

Browse Popular Code Answers by Language