S
Shark
Hi, I am trying to do the following:
string ToLower(string& upper) //tried variations of return type,
including void, to modify upper itself
{
string temp="";
for(int i=0; i<<upper.size(); i++)
{
char c = upper;
temp+=(char)tolower(c); //tried without cast too
}
return temp;
}
With a void ToLower, I tried ToLower(string_to_convert) but
string_to_convert remains the same as before ToLower.
With other variations, the returned type is an empty string. Am I
insane?
string ToLower(string& upper) //tried variations of return type,
including void, to modify upper itself
{
string temp="";
for(int i=0; i<<upper.size(); i++)
{
char c = upper;
temp+=(char)tolower(c); //tried without cast too
}
return temp;
}
With a void ToLower, I tried ToLower(string_to_convert) but
string_to_convert remains the same as before ToLower.
With other variations, the returned type is an empty string. Am I
insane?