c++ - why are [ fopen() / open() / fstream file ] failing on Mac OS X for opening a file? -


I'm trying to open a TAG file on Mac OS X, I have not had any issues with this issue in the last hours. Left I just want to open a tga file even I have tried so far,

  int filedesc = open ("/ users / x2am / desktop / 1177.tga", O_RDONLY ); If (filedesc & lt; 0) printf ("% s", strerror (errno));  

Output> Operation not allowed

  FILE * fp = fopen ("/ user / x2am / desktop / 1177.tga", "rb" ); If (fp == NULL) printf ("file is not loaded");  

Output> File not loaded

  Filename = L "/ Users / X2 / Desktop 11 77." "; Std :: String narrow (filename.begin (), filename.end ()); Fstream file (narrow.c_str (), iOS :: in | iOS :: binary); if (! FileGood ()) Printf ("File not loaded");  

Output> File not loaded

With the output in mind (open), in any way, the operation

Information on the image I.

Image Details Enter here

The app is sandboxed,

Let me now I have tried to do everything that I can do. There is something invisible in front of me which I am missing? Any help is greatly appreciated :)

The problem was due to the fact that the apple was due to sandboxing. Then it raises the question, apple sandbox: friend or foe? /Users/USER/Library/Container/com.xxx This worked after inserting the file in .xxx / Data / .htm thanks to @shr, AN :)


Comments