i have a char *stname = new char[41];
which is in upper case, how can i turn it to lowercase with a method different from the FAQ?
i have tried the method provided in the FAQ but failed....please help
Printable View
i have a char *stname = new char[41];
which is in upper case, how can i turn it to lowercase with a method different from the FAQ?
i have tried the method provided in the FAQ but failed....please help
thank you for helping.
heres the code, which is worked:
[code]
#include<cctype>
#include<iostream.h>
int main()
{
char stname[] = "YU CHAU STREET";
thank you for helping.
heres the code, which is worked:
but if i have defined stname1 as follow:Code:#include<cctype>
#include<iostream.h>
int main()
{
char stname[] = "YU CHAU STREET";
for(char *letter = stname1;*letter !='\0'; ++letter)
{
*letter = tolower(*letter);
}
cout << stname1;
return 0;
}
how should i change the code so that it will work too?Code:char *stname1 = new char[41];
once again thank you....
it works.....
really thank you ~~
i learn something new everytime i come here~~~
what a great place here~~~~