-1

I have a function using SetFilePointer()

HANDLE In;
SetFilePointer(In, 3, NULL, 0);

I want to adapt this function for non-windows platforms taking a Pointer to FILE (FILE*) as argument .

What function Set_File_Pointer_SomeHow() does the same as SetFilePointer() which can I use for that?

FILE* In;    
Set_File_Pointer_SomeHow(In,      );
Jarod42
  • 203,559
  • 14
  • 181
  • 302
user3443063
  • 1,455
  • 4
  • 23
  • 37
  • 2
    [`fseek`](https://en.cppreference.com/w/cpp/io/c/fseek)? – Jarod42 Jan 31 '22 at 12:42
  • 1
    what you seek is how to seek in a file. – Abel Jan 31 '22 at 12:43
  • 1
    Note that `FILE*` and the related APIs are part of the C standard library, not the C++ standard library. They're included in C++ as it's backwards compatible with C. – unddoch Jan 31 '22 at 12:45
  • seekg Please read here: https://en.cppreference.com/w/cpp/io/basic_istream and here: https://en.cppreference.com/w/cpp/io/basic_istream/seekg – A M Jan 31 '22 at 12:46

1 Answers1

1

I think you want std::fseek(std::FILE* stream, long offset, int origin).

Jarod42
  • 203,559
  • 14
  • 181
  • 302