title: Selection sort not grabbing last element in array
body: <pre><code>void ProcessSort(int studentIDs[], string studentNames[], int num)
  {
  
     for (int i = 0; i &lt; num - 1; i++)
     {
        int mindex = 0; 
        //DO6: finish the inner loop
        //     Hint: it should start from i+1 and go until num-1
        //     if studentNames[j] is greater than studentNames[mindex]
        //     then store j in mindex
        for (int j = i+1; j &lt; num - 1; j++) {
           if (studentNames[mindex] &lt; studentNames[j]) {
              mindex = j;
           }
        }
  
  
  
        //DO7: Swap student names
  
        SwapNames(studentNames[mindex], studentNames[i]);
  
        //DO8: Swap student IDs'
        SwapIDs(studentIDs[mindex], studentIDs[i]);
  
  
     }
     cout &lt;&lt; "Class List sorted by name." &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Selection sort seems not to grab last element in array. There are two parallel arrays, one with names and one with ids, but it seems to be that the last name in the student names array isnt registered with the sort. Any help would be greatly appreciated. </p>