• Welcome to Valhalla Legends Archive.
 

mkdir

Started by MoNksBaNe_Agahnim, January 15, 2004, 08:51 PM

Previous topic - Next topic

MoNksBaNe_Agahnim

I am doing this bank project for an upcoming C++ tournement im in,

the part I am doing is they want you to be able to create a new costumer and save to a text file, be able to modify the costumer such as the customer's name, or delete the comstumer's info. I got this all to work and now im trying to get it so that the user can make a folder were all the customer's info can go into (since there can be more than one costumer) that way there are several different folders for the different people who have an account making it organized better...

But i can't seem to have it so the user inputs the name they want the folder to be called then have it make the folder by that name, i have tried things like


char fname[20];
char fname2[255];

cout << "Input account name: ";
cin >> fname[20];

strcpy(fname2, fname);
system("mkdir 'fname2' ");


but the system function doesn't seem to work that way...

Is there a way to do this like how a user can make the name of a txt file they want?

K

#1
how about:


mkdir("full\\directory\\path");


Edit: I think the unix version takes a second permissions argument.  Not sure.

Kp

I have to ask - why's a bank program care about costume designers?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Tuberload

Quote from: Kp on January 15, 2004, 10:53 PM
I have to ask - why's a bank program care about costume designers?
That is kind of strange... I have never seen anyone rotate a word the is spelled correctly, and not spelled correctly so many times. It's almost like he has split personalities, and they just kept coming and going. One can spell, one can't.;D
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

MoNksBaNe_Agahnim

what do you mean Kp?

Kp

Quote from: MoNksBaNe_Agahnim on January 15, 2004, 08:51 PM
new costumer
modify the costumer
customer's name
comstumer's info
customer's info
more than one costumer

That's what I meant. :P  You're creating costumers for the bank... :)
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Zakath

Pronounce it KOSS-toom-er instead of KUSS-tuhm-er and it makes sense. :p

Costumer == someone who makes costumes...
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.