I have an array of strings and I'm trying to convert all characters to lower case.
void make_lower(char **array)
{
int i = 0;
while (array[i] != NULL){
array[i] = tolower(array[i]);
i++;
}
}
I know that tolower function reads characters one at a time, not the whole string at once. That's why I thought I had to use a loop like this, but still I get warnings and the function doesn't work:
passing argument 1 of ‘tolower’ makes integer from pointer without
a cast [-Werror]
note: expected ‘int’ but argument is of type ‘char *’
assignment makes pointer from integer without a cast [-Werror]
I would really appreciate your help.