The problem is that the compiler cannot compare two different types as you know (max>strlen (mat[i][j])) and i don't know how to change it. Any tip would be appriciated! Thank you!
By the way, i work in mingw.
But I think this is not the problem. strlen works for NULL terminated characters, which means, your string has to end with NULL for strlen to work, here's an example:
Now if you use strlen with this, you'll get a wrong answer. To get the right answer, you have to add this line too:
mystr[5] = NULL;
Your array doesn't differ conceptually whatsoever from an int array except that char's size is 1 byte. Can you ever measure the length of an array of ints? not really! So to do it, you have to terminate your string with a NULL like I mentioned. It's some kind of a special hack to make strings defined in size.