0
什么它在这个C代码的Objective-C等位:寻求到文件中的Objective-C
FILE* file = fopen([filePath UTF8String], "r, ccs=UTF-8");
if (file != 0)
{
char buffer[1024];
//seek to file position....
fseek(file,11093, SEEK_CUR);
int cnt = 0;
while(fgets(buffer, 1024, file) != NULL)
{
if (cnt>0) {
if(buffer[0] == 'a') {
break;
}
//Objective c syntax....
NSString *string = [[NSString alloc] initWithCString: buffer];
}
cnt++;
}
fclose(file);
}
是的这是正确的,但它只是为了我个人的知识... – Maxime 2011-05-05 19:53:54