Jan 26, 2010 at 6:30am UTC
I need to read part of a line into a string and then skip to the next line and read in again and keep doing this until the end of file. the files look like this:
070101_rpts_hail.csv
070102_rpts_hail.csv
070103_rpts_hail.csv
070104_rpts_hail.csv
and I only need the six numbers in the beginning of every line. They are going to be stored into an array of string.
Last edited on Jan 26, 2010 at 6:35am UTC
Jan 26, 2010 at 6:35am UTC
std::getline(file_stream,string);
Jan 26, 2010 at 6:38am UTC
but I only want the first six numbers and none of the rest
Jan 26, 2010 at 6:40am UTC
Get the entire string, then just take the first 6 number/characters out of it.
Jan 26, 2010 at 7:02am UTC
Last edited on Jan 26, 2010 at 7:03am UTC
Jan 26, 2010 at 7:07am UTC
Thanks for the very quick responses. I can always rely on the help of the community. Also this worked great it will speed up my project greatly.