Directories don't exist for the C++11 (or C++14) standard. Later C++ standard (e.g. C++17 ...) might offer the std::filesystem library.
You could use operating system specific primitives. On Linux and POSIX, consider the mkdir(2) system call (and CreateDirectory function on Windows).
You could find framework libraries (e.g. POCO, Qt, Boost, ....) wrapping these, so with these libraries you won't care about OS specific functions.
but the directory name would be a string given by the program.
Then you could consider building a command as a runtime C string for system(3). E.g. with snprintf(3) (or with some std::string
operation). Beware of code injection (e.g. think of the malicious user providing /tmp/foo; rm -rf $HOME
as his directory name on Linux)!