int MailBoxes::boxIndex(int box) //postcondition: returns the index of the element in myBoxes // whose POBox field equals box if there is such an element; // otherwise, returns -1. { int k; for(k=0; k < myBoxCount; k++) { if (myBoxes[k].POBox == box) { return k; } } return -1; }