Hi, I'm working on a machine problem where I am to design a Roman Numeral calculator that inputs two Roman numbers and an arithmetic operator and prints out the result of the operation, also as a Roman number. I'm to use functions for the whole program and I can't reference global variables directly, I should be using parameter lists.
In order to get started with the rest of the functions I need to figure out how to read the input file. I'm trying to write the function get_Data.
"get_Data: This function receives the input file, reads one series of chars representing a Roman numeral, and sends back the value of the numeral read in. This function can call the function convert_from_Roman_to_Decimal to do the conversion while it is reading each letter."
The input file "mp4romanletrdata.txt" looks like this.
MCCXXVI CV +
MCCXXVI MCCXXVI /
V I -
MDCLXVI III *
DL DXXXXVIII -
D L /
MDI CXI +
XXV IIII /
XI CII *
I have a function that reads the file, but I can't figure out how to read the data individually.