Question
How do you skip over columns of data when reading a file in C++? Below is a snippet of the data I'm reading, which is
How do you skip over columns of data when reading a file in C++?
Below is a snippet of the data I'm reading, which is from a csv.
WAST,DP,Dta,Dts,EV,QFE,QFF,QNH,RF,RH,S,SR,ST1,ST2,ST3,ST4,Sx,T
31/03/2016 9:00,14.6,175,17,0,1013.4,1016.9,1017,0,68.2,6,512,22.7,24.1,25.5,26.1,8,20.74
31/03/2016 9:10,14.6,194,22,0.1,1013.4,1016.9,1017,0,67.2,5,565,22.7,24.1,25.5,26.1,8,20.97
I need to ignore the header row, which I think I've done correctly. I now need to read data only from column labelled S. I've tried using infile.ignore to skip over the data 9 times, since S is the 10th data column, but it doesn't seem to be working.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started