Thank you! It works. But I still don't understand why is this. Each element in array A is char*, isn't it?

Quote Originally Posted by Salem View Post
Your cast inside the compare function is wrong.

*(char**)str1