hi guys.
i want a help on making directories in c++.i have used the code to declare and intilliaze the path name and folder name..but the probelem is that i want it to to ask from the user for the drive and folder name..i tried but i didnt get the solution to it ..plz help
m using borland c++ 4.5
for example :
enter the direcorie path and folder name: d:\\abc
but when i do this a pointer error comes there..
#include<direct.h>
#include<iostream.h>
#include<stdio.h>
void makedir(char *n)
{
mkdir(n);
}
int main()
{
char *dir;
cout<<"enter teh directorie you want to create ";
gets(dir);
makedir(dir);
return 0;
}