Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mkdir

Status
Not open for further replies.

3li773

Programmer
Jan 23, 2003
20
0
0
CA
ok I wanted to have my program make a directory with a name that was entered by the user

all I know how to do is
system("mkdir");

I also tried
system.mkdir(user_input);

please help
thnx
 
#include <io.h> // for mkdir()
#include <iostream>

int main()
{
if(mkdir(&quot;C:\\MyDirectory&quot;)==0)
cout << &quot;Success!&quot;;
else
cout << &quot;Could Not Create Directory!&quot;;
cin.get();
}

 
um...

I was thinking of having it like the user enters a name and the directory is that name

sorry for being unclear

thnx for your time
 
Hmmm...pretty elementary stuff, are you that much of a newb? :p

Post the entire program so we can see how far you got, first.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top