How do you have the user input the folder name and have it created in the desktop (for mac)? This is what I have so far.. (and extra code underneath)
#include &
Environment variables are case sensitive, so you need to use getenv("HOME") instead of getenv("Home").
Use Boost Library (though there will be overhead of setting up boost on your system but its worth for doing many other stuffs in C++): boost::filesystem::create_directories()
#include <boost/filesystem.hpp>
// your code....
boost::filesystem::create_directories("/bla/a");