There are two programs in c++ , one of which in the loop constantly writes data to .bin , and the other reads it all the time. Sometimes there are data that do not correspond to reality, apparently due to simultaneous access to the file.
As I understand it, it is necessary to use one of the interprocess communication methods to eliminate such things. Which of these methods can you recommend as the "easiest and most reliable"?
And, if possible, please give a link to an example.
flock()- Mikeflock()? - PinkTux