Hi,

Imagine a vector of structures with each structure containing various variables.

```
struct Data
{
double x
double y
double z
}
vector<Data> Dataset
vector<Data>::iterator it
```

//input some data from a file into DataSet

How can I iterate over this vector, comparing say, x at the nth row to the x at the (n-1th) row and the x at the (n-2th) row, beginning at n (where n is Dataset.begin() + 2) and moving one n forward at a time?

Thanks,

TR