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);
long long int data type in C++ is used to store 64-bit integers. It is one of the largest data types to store integer values, unlike unsigned long long int both positive and negative. Some properties of the long long int data type are: Being a signed data type, it can store positive values as well as negative values.
C++ llabs() The llabs() function in C++ returns the absolute value of a long long int data.
Since you tagged this with "Objective-C", I'm assuming you are also thinking about Macintosh.
Check out fseeko
(which takes a 64bit number).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With