(Noob question)
I am trying to write a function that takes a string and converts every character to lowercase. Problem is, it doesnt...
I am able to compile the program and run it, but the program doesnt turn the string I input into lowercase.
Here is the function:
I have tried using a temporary char to be a middleman in the conversion (I am basically trying anything on the top of my head, because I dont understand the problem, or atleast, I cant see it..) but, without luck.Code:void toLow(string &s){ for (auto i = s.begin(); i != s.end(); i++) { tolower(*i); } }
I dont NEED an example, just someone to point out the error in the code and a point in the right direction. It is probably just a derp error... (I have a lot of them)