I\'m trying to create a function that takes the name of a directory (C:\\foo\\bar, or ..\\foo\\bar\\..\\baz, or \\\\someserver\\foo\\bar
C:\\foo\\bar
..\\foo\\bar\\..\\baz
\\\\someserver\\foo\\bar
With C++17, this can be done quite easily using std::filesystem::create_directories().
Example:
#include ... const char* path = "C:\\foo\\bar"; std::filesystem::create_directories(path);