Does ofstream::open method take extra parameter to set file permission ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Following code is compiled and run fine on Solaris by SunStudio:

#include <fstream.h>
int main() {
    ofstream errorLog;
    errorLog.open("mylog.test", ios::out, 0666);            //0666
seems set the file permission
    return 0;
}

But g++ failed to compile it by complaining not finding the matched method.

My question is whether C++ standard library allows the extra parameter
in the open method to set the file permission.

I googled it and the answer seems to be "no", but hope someone could confirm it.

Anyone knows ?

Thanks.
Michael


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux