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 residing in my Resources folder for my project and this line is being executed in a .mm file. Within the same project in .cpp files I am using practically the same exact code which runs without a problem. Can't seem to figure this one out...
Thanks