What happening in following code?
int main()
{
int i = 37;
int* pi = &i;
i[pi]; //works
i[0]; //error C2109: subscript requires array or pointer type
}
Why is allowed to indexing int with pointer argument and what does it do?
What happening in following code?
int main()
{
int i = 37;
int* pi = &i;
i[pi]; //works
i[0]; //error C2109: subscript requires array or pointer type
}
Why is allowed to indexing int with pointer argument and what does it do?