Reading and array issue

I have a problem with this part of code that I hope someone can help me with:

/ ***************************************getAddress
void getAddress() { // this is getting data from found ARDUINO boards on I2C main bus

for (int xc = 0; xc < 125; xc ++) { // Checks to see if boards 1 through 125 are installed annd running

if (ScanningArray [xc] [0] == 1) {

Serial.print("Boards found xc :: "); Serial.println(xc); // This prints found board addresses


} // end of if

} // end of for loop

} // end of getAddress


This is part of a master I2C.

Scanning array contains the boards found on the I2C bus, currently boards found indicate the correct board addresses I have in the test which are on 4,5 and 6.

The getData function is suppose to get each of these addresses in sequence an uses that information to send data back to the slave. As it currently stands it will only send to the highest slave address, in this case it is 6, if 6 is reset 5 will appear in the data transfer section.

I have tried breaks and while loops neither of which I could get working correctly.

Desired outcome:

What I would like to be able to do is check to see if the board is present in the scanning array and if it is for that information in sequence to be passed on to the getData function.

As and aside, this is a part of a VERY large piece of code so I am not posting the whole thing up

Any direction in how to overcome this issue would be greatly appreciated as I have fluffed around with this too long

This is now resolved