When I try to compile the following code with g++:
int main()
{
int a[3] = {0, 1, 2};
int (* p)[] = &a;
}
compiler gives the following error : "cannot convert ‘int ()[3]’ to ‘int ()[]’ in initialization". Why isn't it possible to convert int ()[3] to int ()[]? And if it is not possible then how a variable of type 'int (*)[]' should be initialized?