dear there,
I need to read a large file line by line into a vector, and it is inefficient to let vector resize itself as needed. so i would like to count how many lines are there, reserve the vector size, and read from the beginning of the file line by line again.
can anyone give me an idea how to count, and how to move point to beginning of the file again? Thanks.