Nested for loop used to evaluate a two dimensional array of integers
if(i != 0 || i != 2){ //non time arrays


Let's see.


If i is 0 then that is true (it isn't 2)
If i is 1 then that is true (it isn't 0 or 2)
If i is 2 then that is true (it isn't 0)
If i is 3 then that is true (it isn't 0 or 2)


In fact that expression is always true. You probably want:

            if(i != 0 &amp;&amp; i != 2){ //non time arrays




   void MinHrLimit(){
      int i = 0;

      for(int i; i &lt; 3; i++){


You don't need the declaration of i there, because it is redefined in the for loop. In the for loop the variable i has an undefined value. You really want:

   void MinHrLimit(){

      for(int i = 0; i &lt; 3; i++){