Question: Can someone help me write a segment of code that will read info from an input file, which I have defined as ifstream inFile;. It
Can someone help me write a segment of code that will read info from an input file, which I have defined as "ifstream inFile;". It must use the ignore function to read in 3 different floating point numbers (which I have defined as "float num1;" and so forth) which each have a leading letter character in front that must be ignored. I simply can't figure out how to correctly read in these numbers from the input file so any help is appreciated. See the attached picture for more info. ***Important Note*** I'm not allowed to use loops in this, so please refrain from doing so
The Input file format is similar to the information shown below. Look at all of the provided input files to determine the exact format. Note, use the ignore function to move the reading marker to the first character after the A, B or C. Use the extraction operator to read in the values line 1 has A-65.98 B14.23 is the second number the third number is C88.88 as the first number The Input file format is similar to the information shown below. Look at all of the provided input files to determine the exact format. Note, use the ignore function to move the reading marker to the first character after the A, B or C. Use the extraction operator to read in the values line 1 has A-65.98 B14.23 is the second number the third number is C88.88 as the first number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
