Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
If possible, how do I create directories with C++ code? Also, can I then assign security rights to those directories using C++?
1 reply
by emmenjay
You cannot create or manage directories using standard, portable, C++. However most C++ compilers provide platform-specific methods to do this.
On a Unix or Linux system you would create a directory using mkdir() and set access permissions usingchmod() and chown().
If you are using VC++ on Windows, you can use _mkdir() to create a directory (or _wmkdir() to create a directory with a Unicode name) and then _chmod() or _wchmod() to set basic access permissions. However, a more flexible way is to use CreateDirectory() which allows you to specify a security descriptor.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
3 replies
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
0 helpful
1 reply
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies