Hi sorry for the confusion,i'l try again to put my Q in the best possible form.

1)I'l explain my set of data characteristics: Ihave 2 sets of them as shown below(This just apart of it not the complete)

a1 b1 c1 a2 b2 c2

1 2 0 2 4 4

1 3 1 2 5 3

1 4 3 2 6 2

1 5 6 2 7 0

a1 & a2 have fixed values alwayz. b1 & b2 varies according to their respective c1 & c2 value.

2)I need C++ , firstly to use set1 as an reference, than it needs to scan c2 for the same value as in c1, once it gets c1=c2, it needs to record both the value for b1 & b2.

3) this what it basicaly needs to do. But since the 'c' values vary from 0 to 32(0,1,2......30,31,32,0,1,2.....30,31,32,0...).There is a possibility of a number repeating twice or thrice n so on.

4)So to avoid the problem, the program needs to record the first c1=c2 first. The next c1 + 1 value wil be in the following c2 +1/+2/+3. (Here the + refers to the next row n so on)

5)If it can't detect c1 + 1 in the given range, it needs to move to c1 + 2, and scan at c2 +1/+2/+3. In short if it had detected a corresponding value for c1 + n at let's say at c2 + x, for the following c1 + (n+1), it has to scan from c2 + (x+1/+2/+3). If it doesnt it has to move to c1 + (n+2) and scan at the same c2 + (x+1/+2/+3), if it gets a similar value for c1 + (n+2) = c2 + (x+2), than the next scanning for c1 +(n+3) wil be at c2 + ((x+2) +1/+2/+3)) and so on.

I hope i havent complicated things again, if its stil confusing i'l try again,thanx for the responz, appreciate it.