I have to write a program that accepts a single argument, which is the name of a file. The file should contain a series of assembly-language instructions that form a short assembly-language computer program. My program should open and read this file, one line at a time. It must parse the data in the program and cout possible errors on the assembly code.(EX. Error on line 1: Missing third ",". Error on line 2: Extra data after instruction. Error on line 3: Expected Register for third OPERAND; saw “PC”.) How can i read the program line by line and parse it into my c++ program?
(We are not allowed to use string library.)