Filenames stored as strings

Hi people.

I'm using windows forms to write a program and need some direction if someone is willing to give it.

1. How do I go about seeing how many files are in a directory and storing this number as an interger?

2. How would I go about writing code so that I can store a list of *.txt files in a given directory as strings?

E.g. file1.txt = string1, file2.txt = string2, file3.txt = string3 and so on.

Any advice would be great!
Thanks in advance.
After a couple of days of searching, I think that using an array / vector may be part of the process that I'm trying to understand.

So I'm guessing that each element of an array stores a filename? Again, any advice would be great!

Thanks,
Topic archived. No new replies allowed.