I know that in winapi exist ReadFile() function for reading data from file, but I don’t know how can I set the position of reading from file. Can I do this using WinAPI?
I know that in winapi exist ReadFile() function for reading data from file, but
Share
Yes, you can do that with
SetFilePointerEx. However, unless you have a good reason for using the raw WinAPI, it’s generally a better idea to use a cross-platform I/O library, such as C’s stdio library or C++’s iostream library. That way, your code is portable to any platform.