Answers for "how to make a c++ program that counts the letter y in string"

C++
14

count a character in a string c++

count(str.begin(), str.end(), 'e')
Posted by: Guest on June-05-2020
0

count number of char in a string c++

string str_V;
char chr
getline(cin, str_V);
for(i=0; i<=str.length; i++)
{
 	  if(str[i]==chr)
      {
        space++
       }
}
Posted by: Guest on May-09-2021

Code answers related to "how to make a c++ program that counts the letter y in string"

Browse Popular Code Answers by Language