Is there a way to define the sharing mode of a file w/ fstream?
If I make
I can''t open the file w/ another process before I close f.
Is there a way w/ Standart C++ (I now that the fstream MS specific can do this, but I want make it protable).
Jester, studient programmer
The Jester Home in French
The problem is: On VC++: sh_read and sh_write are defined on fstream.h wich seems to be Microsoft specific (not in the std namespace) and independant of fstream. The more near in the fstream header: explicit basic_fstream(const char *_S, ios_base::openmode _M = in | out)
On Digital UNIX V4.0D w/ gcc 2.95: No sh_read nor sh_write in the fstream.h. The more affialte ctor i find is : fstream(const char *name, int mode, int prot=0664);