how to infile multiple lines of chars into one data location
<p>What i want to do is infile a line of chars then perform operations on it save it to an out file location then read the next line and do the same thing.</p>

<pre><code>//seperate function called within int main.
//expression is passed by reference to this function.

ifstream infile;
int i = 0;

infile.open("test.data");

if(infile.fail()){
  cout &lt;&lt; "ERROR: File failed to open." &lt;&lt; endl;
  exit(1);
}

while(!infile.eof()){
  infile &gt;&gt; expression[i];
  while(expression[i +1] != '\o'){
    infile &gt;&gt; expression[i + 1];
    i++;
  }
  //perform other operations within a class

  //print out results
  //read next line from file.
</code></pre>

<p>Thank you. I just need help with reading the next line in the file. May not be entirely logically correct just a rough example of what is going on.</p>
