Why do I get a warning when I do this:
char (*arr_ptr)[];
char str[] = "string";
arr_ptr = str;
The warning is:
assignment from incompatible pointer type
But when I change the assignment to:
arr_ptr = &str;
The warning disappears. I thought str, &str, and &str[0] were all the same. So how would str or &str[0] be incompatible?
I think my code is being compiled by GCC since I'm running it on TextMate.