ofstream woes
Here's what the function looks like:
void *writeFile(void *argument, bool bPrime, long testNo, long *factor, int factorLimit)
{ int i;
ofstream outFile;
outFile.open((char *) argument, ios::out);
//Looks to see if the file is false.
if (!outFile)
cout<<"outFile is false\n";
if (outFile.good())
{ outFile.clear();
outFile.seekp(ios_base::end);
outFile <<"Number tested: " <<testNo <<endl;
if (bPrime == 1)
outFile <<"The number is prime."<<endl;
if (bPrime == 0)
{ outFile <<"The number isn't prime." <<endl
<<"Factors: ";
for (i=0; i<factorLimit; i++)
{ outFile <<factor[i];
if (i != factorLimit-1)
outFile<<", ";
}
}
outFile.close();
}
return NULL;
}
Why do all the records keep disappearing? Thanks.

