Warning: comparison of distinct pointer types

First, myArray == &myArray == &myArray[0] is not going to do what you expect.

Second, &myArray is of type int (*)[10] while myArray and &myArray[0] are of type int *. Both types are incompatible with each other.

Leave a Comment