Note: this answer is somewhat quick and dirty, and doesn't handle all cases. If this is ok with you, read on. If not, consider using one of the other options.
You can use good old mkdir for that. Just run
system("mkdir " + strPath);
and you're done.
Well, almost. There are still cases you have to take care of, such as network shares (which might not work) and backslashes. But when using relatively safe paths, you can use this shorter form.
Another thing you might find useful getting rid of the possible nuisance is _fullpath(), which will resolve the given path into a full and clean one. Knowing you have a clean path, you should have no problem writing a rather trivial recursive function that will create the folders one by one, even when dealing with UNC paths.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…