Thanks for your response cire, I'm assuming based on the compiler errors not by myself.
In condition a compiler says; int (*)[3] ------in condition b compiler says; int [3][3] ----and says it about same variable (I didn't change anything in declaration of this variable)
int (*)[3] is pointer to an array of 3 int. p's type is not int[3] (you meant here "not int(*)[3]" right?), it is int[3][3] |
I agree with you if this is what you meant
and thanks keskiverto, I haven't tried this on other compilers but one thing is still kind of funny I'd say
1. when I'm comparing with a simple integer, compiler is casting the compared in pointer
2. when I'm comparing with a pointer, compiler is casting the compared in an array
to my mind logical casting try from compiler should've been exactly opposite
I'd say
1. when comparing with simple variable try casting in array
2. when comparing with pointer try casting in pointer to array
I might have a wrong logic please guide me if I'm thinking in a wrong way
thanks in anticipation