while (j < i)
 {
     cin.ignore();
     cout << "Please type enter to display: ";
     cin >> enter2;
     
     if (strcmp(enter, enter2) == 0)
     {
         cout <<  "ID: " << students[j].ID << endl;
         cout << "Name: " <<students[j].name << endl;
         cout << "Address: " <<students[j].address << endl;
         cout << "Telephone: " <<students[j].telephone << endl << endl;
         j++;
     }
 }
 j = 0;

Program will display all students’ information in tabular form. Display 2 students at any one time. When user types <enter>, program then display the next 2 students,
until all students are displayed.

I'm suppose to display 2 students at 1 go, wait for user to type enter then display the other 2 students.
The problem is that I'm stuck with this particular part.
If I put
for (int z = 0; z < 2; z++)
Then there would be a problem if my array has an odd number. Hmmm what to do...

This question has already been answered. Start a new discussion instead.