Also, is there a cross-platform way to change the attribute of a file from read-only to writeable?
Thanks much, Bert
Also, is there a cross-platform way to change the attribute of a file from read-only to writeable?
Thanks much, Bert
Check out boost::filesystem. It'll do what you need. I believe this is one of the parts of boost that is going to be included in the next version of C++, at which time it will become part of the STL, but right now it's a (free) 3rd-party library. It's so common that it can almost be considered standard though.
The only way to do this is to use operating system specific features - C++ has no functionality in this area.