title: c++ how to create a directory from a path
body: <p>what is a convenient way to create a directory when a path like this is given: "\server\foo\bar\"</p>
  
  <p>note that the intermediate directories may not exist.</p>
  
  <p>CreateDirectory and mkdir only seem to create the last part of a directory and give an error otherwise.</p>
  
  <p>the platform is windows, MSVC compiler.</p>
  
  <p>thanks!</p>