0

Dear All

Please share your thoughts and ideas!!!
I have thousands of files (.txt) which I have to parse and get bits out of them
(e.g. 5th bit of each file is 0|1?).Anyway of dealing such lot files to analysis ???

int main(int argc, const char* argv[]) {

    for (int i = 0; i < argc; ++i) {
        std::cout << argv[i] << std::endl;
    }
    std::cin.get();
    return 0;
}

I used above to push bits of each file into a vector, but it requires thousands of vectors to be defined.

providing any hint of reading and dealing with such a big number of files will be very helpful. Please shed some lights on it!!
Thanks in advance for your attention.

2
Contributors
1
Reply
4
Views
5 Years
Discussion Span
Last Post by Labdabeta
0

I am not entirely sure about what you are attempting to accomplish, but there shouldn't be much of a problem. For one thing, you can make vectors of vectors to store many vectors like so:

vector<vector<type> >//note the space it is essential!

Also be careful to close all of your files when you are done with them. Regardless, since file IO can be very time costly, your program may be very slow.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.