Link to home
Start Free TrialLog in
Avatar of orenw
orenw

asked on

Shareing Files in C++

how can i make file share in c++ fstream?
and not be the _FSOPEN or SOPEN.
Avatar of mrosen
mrosen

In the third parameter to either the constructor or the open() function, you specify one of the following:

filebuf::openprot, which is equivalent to the operating system default, filebuf::sh_compat, under MS-DOS. The possible nProt values are as follows:
filebuf::sh_compat   Compatibility share mode (MS-DOS only).
filebuf::sh_none   Exclusive mode — no sharing.
filebuf::sh_read   Read sharing allowed.
filebuf::sh_write   Write sharing allowed.

let me know if this solves what you're asking
ASKER CERTIFIED SOLUTION
Avatar of jmmougeolle
jmmougeolle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial