title: How to use a boolean in a while loop C++
body: <p>What is the correct syntax to use a while loop that exits when a boolean is true.</p>
  
  <p>I'm not sure if this is works right:</p>
  
  <pre><code>while (CheckPalindrome(a, reverse) == false)
  {
      CalcPalindrome(a, reverse);
      n = a;
      while (n != 0)
      {
          remainder = n % 10; //Finds the 1's digit of n
          reverse = reverse * 10 + remainder;
          n /= 10;
      }
      CheckPalindrome(a, reverse);
  }
  </code></pre>