Get Directory Path and create new one at runtime

How to create folder runtime and place output file into that folder in c or c++?
Last edited on
closed account (Dy7SLyTq)
windows or *nix
closed account (Dy7SLyTq)
out of my league then, but i do know that what you need is in the win32 api
The function you are looking for is "CreateDirectory()" my good man:

As for placing your output file there you simply make the new directory first, then include it in the path when you create the output file with either "CreateFile()" or the std::ofstream object.
Topic archived. No new replies allowed.