Hi sorry Met, actually my codes were mixed up the other day.
Ok, I'l try explaining again using a different example.
1)Lets say we have a Topography map with its total length(j) and width(i) 100 x 200.
2)Each pairing of i & j has a height value of the map.
3)Now we'l take 2 horizontal straight lines, this means fixed j and a constant change of i: i.e 1st line-(50,50) - (50,100) and 2nd line-(75,60)-(75,110), can be seen j(length) for both the lines are fixed and i(width) changes.
4)The height value is contained for each j & i in the topography map buffer.
5)Now what i want the C++ to do is to find the same height value for each adjacent j's in both the horizontal lines. i.e: from the above example if (50,50)-1st line and (75,60)-2nd line has both the same height value it'l record, than it'l go to the next consecutive point of each line (50,51) and (75,61) and so on......
Hope this wil give u a clearer picture Met, thanx alot for ur patience with a beginner, and sorry for the trouble