title: Function keeps returning true, cant find mistake?
body: <p>I need to write a function that will take two arrays and their size and then compare if the cells were equal.
  If the cells were equal it will have to return true if not false.
  However i cant seem to find my mistake, it keeps returning true.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  bool XArray(int a[],int b[],int sizeofA,int sizeofB, bool&amp; v)
  {   
      for (int i = 0; i &lt;= sizeofA &amp;&amp; i &lt;= sizeofB;i++)
      {  
           if (a[i]==b[i])
           {
                  return v;
                  continue;
           }
          else
          {
                  v = false;
                   break;
          }
      }
      return v;         
  } 
  
  
  int main()
  {   
      bool x = true;
      int a[3] = {1,2,3,};
      int b[3] = {1,2,7};
      XArray(a,b,3,3,x);
      cout &lt;&lt; x &lt;&lt; endl;  
  
      return 0;
  }
  </code></pre>