eyesrglazed
Programmer
This function is supposed to read from an HTML file saved as "temp.txt"... Unfortunately, it doesn't work more than once running in a loop. I'm not very good at troubleshooting, but it looks like it isn't reading from the beginning of the fiel the second, etc, times... Can someone have a look?
Code:
void Search()
{
fnd = 0;
oFile << fileName1 << fileName2 << endl;
iTemp.open("temp.txt");
iTemp >> temp;
while (temp != "")
{
if (temp == srch1)
{
oFile << "Members : " << prev << endl;
cout << "Found Members." << endl;
fnd++;
}
if (temp == srch2)
{
oFile << "Guests : " << prev << endl;
cout << "Found Guests." << endl;
fnd++;
}
prev = temp;
iTemp >> temp;
}
iTemp.close();
}