Using fopen() in Objective-C
问题 I am puzzled by a crash I keep getting due to an error at this section of code: FILE *fid200; fid200 = fopen ( "Length200Vector.txt" , "w" ); if (fid200 == NULL) perror("Error opening Length200Vector.txt"); for (int n = 0; n<200; n++) { if (n == 0) { fprintf (fid200, "%f", self.avgFeatureVect[0][n]); } else { fprintf (fid200, ", %f", self.avgFeatureVect[0][n]); } } fprintf (fid200, "\n"); fclose(fid200); The error is: Error opening Length200Vector.txt: Operation not permitted. The file is