I am looking for a way to create a directory based on user input. I am using the system() function.
I basically want to run system("mkdir BOB"
;
where BOB is a variable that users define.
is there a better way of doing this?
int main()
{
string webName;
cout << "Enter the dir name: ";
cin >> dirName;
system("mkdir dirName"
;
}
I basically want to run system("mkdir BOB"
where BOB is a variable that users define.
is there a better way of doing this?
int main()
{
string webName;
cout << "Enter the dir name: ";
cin >> dirName;
system("mkdir dirName"
}