Can two persons access a single file at a given time in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can two persons access a single file at a given time in c++

how and without any error

11th Jun 2018, 9:25 AM
Vinit
Vinit - avatar
4 Answers
+ 5
If you open it for read it can work.
11th Jun 2018, 5:35 PM
Paul
Paul - avatar
+ 1
i would assume that depends on the operating system, but most likely not. you can use multiple threads to access it if you are careful
11th Jun 2018, 11:17 AM
Max
Max - avatar
+ 1
it is the same problem like in operating system subject ,concurrent conquerency problem called reader writer problem.... solution : synchronization
11th Jun 2018, 6:49 PM
Devesh Kumar
Devesh Kumar - avatar
0
thank you max
11th Jun 2018, 1:04 PM
Vinit
Vinit - avatar