Hey everyone, can I create a folder using c++, just the way we create a file?

Recommended Answers

All 2 Replies

Sure, but I get the feeling you didn't search first. Try this:

#include <iostream>
#include <direct.h>
using namespace std;

int main() {
  _mkdir("C:\\My Directory");
}

Thanks man ,it really is possible!!

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.