title: Cin without waiting for input?
body: <p>For a project I am working on, I need the program to be able to receive input from the user, but while they are inputting something, the program can continue in the loop.</p>
  For example:
  <pre><code>while (true)
  {
      if (userInput == true)
      {
          cin &gt;&gt; input
      }
      //DO SOMETHING
  }
  </code></pre>
  <p>This would mean that <code>//DO SOMETHING</code> would happen every loop, without the user pressing enter a million times.</p>
  Before, my solution was creating my own input using <code>kbhit()</code> and <code>getch()</code> from conio.h, but that got very messy, and I don't like using conio.h for portability reasons etc. Also, it doesn't need to use <code>cin</code> specifically, because there is a good chance it just wouldn't work with it, so any good solution that doesn't require me making my own input with a 'not very good' library, would be much appreciated.