title: How to read integers elegantly using C++ stream?
body: <p>I have a file full of lines in this format:</p>
  
  <pre><code>1 - 2: 3
  </code></pre>
  
  <p>I want to only load numbers using C++ streams. Whats the most elegant way to do it? I only thought about cin.get() and checikng each char if it is number or not.</p>