title: I want to perform a mathematical operation from values in a string
body: <pre><code>string resistance;
  ifstream in;
  in.open(filename);
  while (!in.eof())
  {
      getline(in, resistance);
      cout &lt;&lt; resistance &lt;&lt;endl;
  }
  in.close();
  </code></pre>
  
  <p>That is the code im using to read from the file.
  The output from the file is:
  for example:</p>
  
  <p>10  25  10  60  45  35</p>
  
  <p>10  45  23  45  65  88</p>
  
  <p>I want to take each line and perform a mathematical operation by each each value of the line to a variable</p>