I have a pointer "a", it is of type A*. I now that there is n objects of type A at that address and I want to iterate over them.
I would like to cast it to A[n], so that I can use the c++11 range-for and write for (auto temp : a){...}
.
Of course, I can use a classic for(int i=0; i<n; i++) {temp=a[i]; ...}
but the range-for is cleaner.