xnerdx
September 16th, 2010, 04:36 PM
I'm having an issue with a function I built to make the string all lower case. I have the fucntion taking an argument of (string* uInput) and the function is called by (&tempInput). In the function being called I'm trying to run uInput.c_str() (I've also tried c_str(uInput) but I get an error about c_str() being undeclared (first use in function). Here is the class function I'm attempting to build:
void FCard::makeAllLower(string* uInput)
{
for(int i = 0; i < strlen(c_str(uInput)); i++)
{
uInput[i] = tolower(uInput[i]);
}
}
I use c_str in other instances of the program and have no problem. Is it because I'm using a string*?
void FCard::makeAllLower(string* uInput)
{
for(int i = 0; i < strlen(c_str(uInput)); i++)
{
uInput[i] = tolower(uInput[i]);
}
}
I use c_str in other instances of the program and have no problem. Is it because I'm using a string*?