double speedTest()
{
double dInitialTime = clock(), dFinalTime = 0;
double dRepititions = 99999999;
double dResult;
cout << "\nCalculating...\n\n";
for(int nCounter = 0; nCounter <= dRepititions; nCounter++)
{
pow(dRepititions, pow(dRepititions, dRepititions));
}
dFinalTime = clock();
dResult = dFinalTime - dInitialTime;
ofstream outf("Results.dat", ios::app);
outf << dResult << endl;
return dResult;
}
I created this function (as part of a larger program) a while back, but when I upgraded to Xcode 4, seemingly ofstream does not work anymore. While the code compiles, noting is written to the file when this function is called. I've looked over it, but can't seem to find anything wrong with it. Any thoughts? Thanks