title: boolean function not working
body: <p>I'm wondering if the logic is right for this. The function gets paased an array of lets say 1,2,3,4,5 through compcards[] and also a number a user would input such as 4. however if the user guessed lets say 6 it would return false. I want to ask the user five times to guess the numbers stored in compcards[]. I'm wondering if my if else statements would make sense in this situation?     </p>
  
  <pre><code>bool checkIfCorrect(int checkcard, int compcards[]){
      for ( int i=0; i&lt;5; i++)
      {
          if(compcards[i] == checkcard)
              cout&lt;&lt;"correct"&lt;&lt; endl;
          return true;    
      }
      return false;
  }
  </code></pre>