McJagger
McJagger

Reputation: 21

best way to sync a file with changing data

What's the best way to write a dataset to a file that is frequently changing?

i.e a 12 meg dataset that has 4 kb segments that change every 2 seconds. Re-writing the entire 12 megs seems like a waste.

Is there anyway to do this using C/C++?

Upvotes: 1

Views: 419

Answers (1)

Michel Keijzers
Michel Keijzers

Reputation: 15377

Yes you can save from a particular offset in a file. WIth c it is the seek command so if you look for something similar in C++ you probably will find it.

See http://www.cplusplus.com/reference/clibrary/cstdio/fseek/ for an example

Upvotes: 3

Related Questions