C++ Reading From File Loop Messing Up
<p>I have a problem with a simple file read.  I have 4 four long lines of T/F's with a count at the beginning.  I read in with a myfile >> count, and myfile >> value to get the values with a while with the count to finish it off the line and goto the next but I have a problem going to the third line for some reason.  Not sure how to get the data file on here...    Thanks for looking!</p>

<pre><code>int main() {
    ifstream myfile;
    int count;
    string value;

    myfile.open("branches.txt");

    while(!myfile.eof()) {
        myfile &gt;&gt; count;
        cout &lt;&lt; count &lt;&lt; endl;

        while(count &gt; 0) {
            myfile &gt;&gt; value;
            count--;
            //cout &lt;&lt; value;
        }

        myfile &gt;&gt; count;
    }

    system("pause");
    return 0;
}
</code></pre>
