title: Checking for incoming data type from file
body: <p>I'm reading in from a .txt file that looks something along the lines of:</p>
  
  <pre><code>int string string string
  int string string
  int string string string string string
  </code></pre>
  
  <p>where the number of <code>string</code> types after each <code>int</code> is unknown. Each line represents a new group of values and each group needs to be into their own array value or whatever (don't know if I've worded that correctly but I hope you'll understand what I mean).</p>
  
  <p>Is there a check I can perform so see if the incoming data from the file is an <code>int</code> so that if this is true and can tell my program its a new group of data? </p>
  
  <p>I've tried </p>
  
  <pre><code>int check
  if(check = file1.peek()){//start new group assignment} 
  </code></pre>
  
  <p>but this doesn't appear to work. I need to be able to use the <code>int</code> value once I have found that it is the next data type being read in.</p>
  
  <p>Thanks in advance. </p>