title: How do I recursively create a folder in Win32?
body: <p>I'm trying to create a function that takes the name of a directory (<code>C:\foo\bar</code>, or <code>..\foo\bar\..\baz</code>, or <code>\\someserver\foo\bar</code>), and creates directories as necessary so that the whole path is created.</p>
  
  <p>I am attempting a pretty naive implementation of this myself and it seems to be a string processing nightmare.  There is <code>/</code> vs <code>\</code>, there is the special case of network shares which begin with <code>\\</code> (also you can't attempt to mkdir() the first two levels of the path which are machine name and share name), and there is <code>\.\</code> type nonsense that can exist in a path.</p>
  
  <p>Does there exist a simple way to do this in C++?</p>