Write a main function that performs the following
operations:
a.) Prompts the user to input the names of 3 files: two input files and
an output file.
b.) Reads in the two input files line by line and compares the two
lines.
c.) For each line in the inputs, write to the output file the line number,
a colon (':'), and either "OK" if the lines match or "DIFF" if the lines
are different.
The input files may be of different lengths.
Note that:
- You will NEED to use getline(...) If you use the
>> operator, it will ignore leading whitespace (so your program will likely
incorrectly report " aa" and "aa" as being the same).
Comments
Leave a comment