I'd suggest going through your code with a critical eye, and checking out everything that looks even remotely odd.
I'd do it for you but C++ isn't in my rotation at the moment and I'm tripping on false positives. For example, this caught my eye:
if (!OutputFile.is_open())
{
char FileName [] = "DensityDomain.txt";
OutputFile.open(FileName);
if (!OutputFile)
{
cerr << "Failed to open " << FileName << endl;
exit(EXIT_FAILURE);
}
//cout << "\nGenerating 'DensityDomain.txt'... \n" << endl;
}
Half way down you're testing if OutputFile
is null, after already calling is_open()
and open()
on it. It looked to me as if either 1) OutputFile
won't be null or 2) you shouldn't be calling methods on it before you test it. But I was wrong.
See what I mean?
MarkusQ
2009-03-20 18:36:01