Opening and processing many text files.

Hello, I am almost on my last leg with an assignment. I have 10 thousand text files, each with a random amount of chars. I need a program that opens each text file in the directory, and stores the string in a vector. The vector is then bucket sorted by length of the strings. I have no clue how to tackle this. I am on a Unix system, so I think I have to use opendir() but again, I am not sure. Any help would be appreciated.
using an exe , or a batch file maybe.
$ ./a.out *.txt
Then you will have the filenames on argv[K] (where K goes from 1 to argc-1)
Topic archived. No new replies allowed.