Hello everyone,
for my assignment for school I have to make a HP calculator which works with 4 stacks, and in RPN.
So i allready got the first 3 stacks(normal array, dynamic array and LinkedList) but the 4th stack is the so called "Crazy stack" here you can make a stack in what ever way you like. So i figured a stack making a folder for every value that i push. And that works awesome. But now the problem everytime I want to pop a value i need to get the folder name of the folder in a folder. for example C:\HP Calc\0\ value (the 0 indicated on which place the value is pushed.) So what i want to know is how i can get the name of the value inside the folder 0, since i dont know what the value's folder name is.
Thanks a lot,
Dave
Get the name of a folder inside of a folder
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

D B5 reputationPosted Mar 15, 2009, 2:52 AM EDT
Jan MontanoRank #1,295 · 1.3K reputationPosted Mar 15, 2009, 7:20 PM EDT
static void Test1()
{
string sourceDirectory = @"C:\HP Calc\0\";
//string sourceDirectory = @"C:\Documents and Settings";
string[] subdirectories = Directory.GetDirectories(sourceDirectory);
for (int i=0; i
Console.WriteLine(subdirectories[i]);
}
}
D B5 reputationPosted Mar 15, 2009, 10:45 PM EDT