title: "while (c = getchar())" equivalent in c++
body: <p>Is there some kind of idiomatic expression using the c++ iostream library which is similar to the </p>
  
  <pre><code>while (c = getchar())
  </code></pre>
  
  <p>idiom in c?</p>
  
  <p>note:  I left the statement at simply "c = getchar()" to allow it to be more generic. In real code, I would compare the result of this to something else such as an EOF or newline.</p>