title: C/C++ compare only once
body: <p>I have a while loop inside which I want to do a specific operation only once, and a different operation for all other loop runs.</p>
  
  <pre><code>while (..) {
    if ( 0 == count ) {
         // do_this
    } else {
         // do_that
    }
    count++;
  }
  </code></pre>
  
  <p>Here, <code>count</code> needs to be compared with <code>0</code> only once but it is unnecessarily compared in each loop run. Is there an alternative way where the comparison happens only once and once succeeded is not again called?</p>