title: Running through entire range of `unsigned char` in `for` loop
body: <p>I would like to run through the entire range of <code>unsigned char</code> in a <code>for</code> loop. Say I want to print all numbers from 0 to 255, how should I go about accomplishing that?</p>
  
  <p>The following code would be an infinite loop:</p>
  
  <pre><code>for (unsigned char i=0; i&lt;=255; i++)
      cout &lt;&lt; i &lt;&lt; endl;
  </code></pre>
  
  <p>This one misses out on 0 or 255, depending on whether it is <code>i++</code> or <code>++i</code></p>
  
  <pre><code>for (unsigned char i=0; ++i&lt;=255; i++)
      cout &lt;&lt; i &lt;&lt; endl;
  </code></pre>
  
  <p>I could place a cout before/after the <code>for</code> loop to compensate for the missing entry, but I seek a more elegant solution. </p>
  
  <p>Any help would be greatly appreciated! (<code>while</code> and <code>do-while</code> loops are also welcomed!)</p>