0

I'm trying to make a function that convert string to lower cases; I tried with a for loop but the counter wasn't precise so I tried a for each loop but in C++ for some reason for each loop is a function and that what I ended with

string stringtolower(string str, int num = 0)
{
    for_each(str.begin(),str.end(), tolower(str[num]));
}

so is there a way to add more the num++ operation besides the tolower one

thanks.

GAP
  • 11
  • 4

0 Answers0