EDITED: Basically, I am trying to determine in a vector, being given one element, what the next element is. The elements are contiguous. The expression below is supposed to pass the first element as the previous element, and it should return a pointer to the second element. I want the distance to return the difference b/w the previous pointer and the first pointer to find where the second element is...

I have this expression:

```
int next = *(char *)v_next(vec, vec_first(vec));

```

Then in the function being called, I have this line in order to determine the position of one pointer from another..

```
void *v_next(const vector *vec, const void *previous) {
    ...
    void *first = cvec_first(cv);
    int distance = (char*) &previous - (char*) &first;

```

However, when I compare the first element and the second element, it returns a distance of 32. If I divide this distance by char\*'s size, I get 8. That's clearly way too many bytes to separate one pointer from another and therefore this expression doesn't work out to find the right position...

```
    next = (char*) vec->elems + vec->elemsz + distance;

```

How can I get the subtraction working properly?