If I execute this code
#include <iostream>
using namespace std;
int main()
{
string word;
getline(cin, word);
for (char ch: word) {
if (isupper(ch))
ch=tolower(ch);
}
cout<<word<<endl;
return 0;
}
The characters don't convert to lower cases... What could have gone wrong?