I have a text file with numbers as follows:
num1 TAB num2 TAB…. num22 newline
.
.
.
I would like to read num1 check to see if it is equal to 3 and if yes copy the entire row to a new file. What is the fastest way to do this? The file is quite big 80Mb+. Also, num 1 is repetitive, i.e it goes from 0 to 3 in steps of 0.001. So I just have to read every so many steps. I am not sure how to tell the computer to a-priori skip x-lines?
Thanks.
Given you’ve said that runtime performance is not a primary concern, then the following is clear and concise:
(C++11 support assumed; error handling omitted for brevity.)