Pointers to arrays
billcollis opened this issue · 1 comments
billcollis commented
This code works fine , however the value of the ptr p_arr returned from the debugger, shows the array and not the value pointed to as per the attached image I would have expected the value of p_arr to display as ->11
Looking at the code it seems to me that there is only a pointer type and not an array type, so arrays are subset of pointers?
felixhao28 commented
I intentionally implemented array to keep its structural information, even referenced by a regular pointer. This helps checking boundary and debugging. To answer your question, yes I have implemented array type to be a special case of pointer.