cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Get Directory Path and create new one at
Get Directory Path and create new one at runtime
Aug 6, 2013 at 2:04pm UTC
venkat raghvan
(31)
How to create folder runtime and place output file into that folder in c or c++?
Last edited on
Aug 6, 2013 at 2:04pm UTC
Aug 6, 2013 at 2:05pm UTC
closed account (
Dy7SLyTq
)
windows or *nix
Aug 6, 2013 at 2:22pm UTC
venkat raghvan
(31)
Windows
Aug 6, 2013 at 3:05pm UTC
closed account (
Dy7SLyTq
)
out of my league then, but i do know that what you need is in the win32 api
Aug 6, 2013 at 6:29pm UTC
Computergeek01
(5613)
The function you are looking for is "CreateDirectory()" my good man:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363855(v=vs.85).aspx
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.