title: Reading time in hh:mm format from a line
body: <p>I have a file that consists of lines that look like this:</p>
  
  <pre><code>nameOfFood hh:mm PriceOfFood.
  </code></pre>
  
  <p>I have to count the income provided between 11:30 and 13:30 by each type of food.
  So the output should look like this:</p>
  
  <pre><code>nameOfFood1 yielded $$$ between 11:30 and 13:30.  
  nameOfFood2 yielded $$$ between 11:30 and 13:30. 
  </code></pre>
  
  <p>and so on.</p>
  
  <p>Currently im using an <code>ifstream f</code> to do this (name and time are strings, price  is integer):</p>
  
  <pre><code>f &gt;&gt; name &gt;&gt; time &gt;&gt;price;
  </code></pre>
  
  <p>My question is: how can I read the HH and MM parts of the timestamp into separate (<code>integer</code>) variables, so I can convert them into minutes (60*HH+MM) to make them comparable?</p>