I had an earlier post link textwhere someone said I had my pointer initialized to the wrong element which I don't quite see why, other than they are right and it works with their correction. So here is the basic problem:
If I declare an array from 0 to 30 with
#define ENDPOINT 15
int record[2 * ENDPOINT + 1];
// and want a pointer to be at the middle of the array, so 0 is at the middle, and
// +15 is at 30, and -15 is at 0
// why is int *ptr = &record[ENDPOINT + 1] wrong? why is the correct declaration
int *ptr = &record[ENDPOINT];
Because if I put the ptr at &record[ENDPOINT], that means the 15th entry in the record array which is the 14th index, and then adding 15 would be only 29 right? Thanks!