Hi everyone. I am trying to write a program that controls access to my hard drive.i.e when this program is running, the specified directory can not be accessed. But first, s there any way one can create a folder using c++?
tkud
0
Posting Whiz in Training
Recommended Answers
Jump to PostI assume that you are asking this question for a windows system which won't let you create a directory from
fstream
so you need#include <windows> int main() { std::string folder("C:\\my_folder"); CreateDirectory(folder.c_str(), NULL); return 0; }
The Null is for the security settings which might let …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.