cp /usr/users/mdanfor/public_html/cs221/struct_example.cpp lab9.cppThis code contains everything except the body of the function get_input. You need to write get_input for this lab. Prompt the user for the filename of an input file. Here are the sample input files to use: You can copy each file with
cp /usr/users/mdanfor/public_html/cs221/<filename> .These files are in a format called comma seperated values. Each field is seperated by a comma (',' character). Each record is on its own line, ie each record is seperated by a '\n' character. The lab grades are listed together as one field with spaces between each individual grade. The same goes for the quiz grade. Here is a sample record with each field noted below:
123,John Doe,10 9 10 9 10 9 10 9 10 9,45 47 49 ID Name Lab grades Quiz gradesYou will open for input the filename given by the user and then read in each record. You will need to parse the file character by character looking for commas to indicate a new field, spaces within the lab and quiz fields and '\n' to indicate the end of that student's record.
Email the code to my Helios account.