hi, I tried read with the solution above with memblock on a 200mb text file. it's goes fast.
Then I tried to read file and put it into a vector:
vector<string> text;
copy (it_file, eos, inserter (text, text.begin()) );
vector<string> text;
copy (it_file, eos, inserter (text, text.begin()) );
To copy to clipboard, switch view to plain text mode
this goes very slow (I didn't see the end of the copy!)
I tried this operation of "copy" because I need to sort the lines of the file too. Then I thought to put the lines in a vector and then call sort() on it. But the "reading" is too slow and I need speed.
I'm thinking of implement my own sort on memblock. But maybe it won't so fast as vector.sort().......What do you suggest, please?
Bookmarks