title: Best way to check file format correctness
body: <p>If you have a file format:</p>
  
  <pre><code>&lt;int&gt;&lt;space&gt;&lt;int&gt;&lt;space&gt;&lt;char&gt;&lt;space&gt;&lt;char*&gt;&lt;space&gt;&lt;float&gt;&lt;newline&gt;
  
  &lt;int&gt;&lt;space&gt;&lt;int&gt;&lt;space&gt;&lt;char&gt;&lt;space&gt;&lt;char*&gt;&lt;space&gt;&lt;float&gt;&lt;newline&gt;
  
  &lt;int&gt;&lt;space&gt;&lt;int&gt;&lt;space&gt;&lt;char&gt;&lt;space&gt;&lt;char*&gt;&lt;space&gt;&lt;float&gt;&lt;newline&gt;
  </code></pre>
  
  <p>so for example a file can be:</p>
  
  <pre><code>12 2212 A test1ok 12.0
  11 2442 B something 32.555
  17 223 D sometime1test 12.0
  </code></pre>
  
  <p>Now, given some file, how would you check that it indeed conforms to that format?</p>
  
  <p>How would you go about doing this without using external libraries other than Boost?</p>