我正在使用C++ ofstream写出一个文件.我想将权限设置为只能由用户访问:700.在unix中; 我想我可以发一个system("chmod 700 file.txt");但我需要这个代码才能在Windows上运行.我可以使用一些Windows API; 但是最好的c ++跨平台方法是什么?
ofstream
system("chmod 700 file.txt");
c++ unix windows
c++ ×1
unix ×1
windows ×1