char * my_strlwr(char * str)
{
if(str == NULL)
return NULL;
char * pStr = str;
for(; *pStr != '\0'; pStr++)
{
if(*pStr >= 'A' && *pStr <= 'Z')
*pStr += 'a' - 'A';
}
return str;
}
int main(void)
{
char sz_buf[100] = "Hello World";
char* sz_buffer;
sz_buffer = my_strlwr(sz_buf);//这句就报错了,说是const char 与char 类型不匹配
printf("sz_buf = %s\n", sz_buf);
printf("sz_buffer = %s\n", sz_buffer);
return 0;
}