I need to pass some values to the fseek() method in C which are greater than the maximum value of the signed long type (2147483647). But if I do like below the value of the result is -1 which is not success. Is there anyway that I can do this?
//fp is the pointer to fopen method
unsigned long long index=2147483648;
int status = fseek(fp, index, SEEK_SET);
Since you tagged this with “Objective-C”, I’m assuming you are also thinking about Macintosh.
Check out
fseeko(which takes a 64bit number).