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
Strange. Still doesn't work. Nothing is being written to the file. Here is my output function (to show all test results):
double fileCounter = 0;
cout << "All test results, from the very first:\n";
cout << "\nTest " << fileCounter << ": " << fileReading;
cout << "Next test. Enter 'r' to retest!\n";
I though maybe there was an error there, yet it used to work and, after all, nothing is being written to the file, so actually this function is doing what it should: simply displaying "Next test. Enter 'r' to retest!" So.....
Gah, it is already in my home directory! I have another program that is supposed to create a url file (to the same directory) with a single web address as the only contents, and writing the contents of it worked fine! So there's nothing wrong with my syntax, right?
@Ancient Dragon- I commented out the loop you mentioned, and also the loop in the code that calls speedTest(). Neither had any effect.
@WaltP- Error checking gives me nothing. Apparently, nothing is wrong, but still, eh, wrong. Very strange, as the program worked with old Xcode, and I'm quite sure I didn't change anything, but when I updated to Xcode 4 I have problems.
Oh boy, I heard that there were problems with the installation and that the installer was much larger than it should be, but I didn't know about that! Well I guess it is a problem with Xcode; I know the function is being called and the syntax looks alright. I hope I don't need another 5GB download for the next Xcode update.