I am using C++ ofstream to write out a file. I want to set the permissions to be only accessible by the user: 700. In unix; I suppose I can just issue a s
ofstream
s
No idea if it would work, but you could look into using the chmod.exe executable that comes with Cygwin.
chmod.exe