fseek Questions

3

Solved

I wish to open a file using the "a+b" mode, i.e. if it does not exist it is created automatically, but if it does I don't want to overwrite it. I want to be able to read and write to the file. The...
Claireclairobscure asked 3/4, 2011 at 20:42

6

Solved

This is not a pure programming question, however it impacts the performance of programs using fseek(), hence it is important to know how it works. A little disclaimer so that it doesn't get closed....
Aten asked 13/3, 2010 at 15:52

6

Solved

The code currently does this and the fgetpos does handle files larger than 4GB but the seek returns an error, so any idea how to seek to the end of a file > 4GB? fpos_t currentpos; sok=fseek(f...
Toothpick asked 22/9, 2008 at 2:34

7

Solved

What is the fastest way to read every 30th byte of a large binary file (2-3 GB)? I've read there are performance problems with fseek because of I/O buffers, but I don't want to read 2-3 GB of data ...
Valentinevalentino asked 6/3, 2010 at 23:28

3

Solved

we have a C++ class which basically reads and writes vectors from a binary file. An exemplary read function that loads a single vector into memory looks like this: int load (const __int64 index, T...
Unceremonious asked 11/12, 2009 at 19:48

3

Solved

Q: I'm trying to update a file in place, by using fopen mode "r+", reading a certain string, and writing back a modified string, but it's not working. A: Be sure to call fseek before you ...
Callahan asked 11/11, 2009 at 8:29

5

Solved

Is using fseek to backtrack character fscanf operations reliable? Like for example if I have just fscanf-ed 10 characters but I would like to backtrack the 10 chars can I just fseek(infile, -10, S...
Slinky asked 23/4, 2009 at 4:21

© 2022 - 2024 — McMap. All rights reserved.