tags:

views:

22

answers:

0

So, I've got a class that looks sort of like this:

class A
{
    CStdioFile FIN;
    CString Line;
    void DoStuff();
    void DoOtherStuff();
};

A::DoStuff()
{
    //assume FIN has already been opened
    while(FIN.ReadString(Line)) //<----Weirdness happens here after first iteration
    {
         //do some stuff
         ...
         DoOtherStuff();
    }
}

A::DoOtherStuff()
{
    FIN.ReadString(Line);
    //do something
    FIN.ReadString(Line);
    //do something
    FIN.ReadString(Line);
    //do something
}

When the loop reads for the first time, its fine. The problem is that on subsequent reads, when reading in the loop, its as if I haven't read anything in A::DoOtherStuff(). Any ideas why this might be?