How can I create a new folder for an email manager, I have this code but It doesn't work.
void create_folder() {
int check;
char * dirname;
clrscr();
printf("Enter a directory path and name to create a folder (C:/name):");
gets(dirname);
check = mkdir(dirname);
if (!check)
printf("Folder created\n");
else {
printf("Unable to create folder\n");
exit(1);
}
getch();
system("dir/p");
getch();
}