iOS: Error using a file path in fopen
I'm new to objective-c, and I have the following problem in this code:
NSLog(@"Path: %@", _nomFile); //show--> Path:
/Users/heberthdeza/Library/Application Support/iPhone
Simulator/6.1/Applications/75184CE7-6CCD-4E5E-ABD1-E150CB35164E/Documents/discovery/IOS-4F55A50D-A3C7-4090-9969-F186C0501F89-23172117.zvg
FILE *fp;
fp=fopen([_nomFile cStringUsingEncoding:NSASCIIStringEncoding],"rb");
if(fp==NULL)
{
NSLog(@"ERROR");
}
I always fopen returns NULL(show "ERROR"), I'm doing wrong? Thanks in
advance.
No comments:
Post a Comment