Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help with building a C + + program for file comparison. That can be efficient and work with large files. requirements: 1 .

Can you help with building a C++ program for file comparison. That can be efficient and work with large files.
requirements:
1. the program should open two files that can ignore line breaks
2. the program should run through the files and identify difrences or if same
3. the program should print out the line and column for location purposes
4. the program should give error if one file is longer or shorter than the other file
5. the program should countinue running to countinue looking for diffrences if it encounters one
6. the program should print where the issue has appeared in the text
7. the program can countinue checking after the diffrence line of characters is presented unless there is a better way`
Example file 1(Is much more complex):
abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123
Example file 2(Is much more complex):
abc123
abc123
abc123
abc123
abc123
abc123
abc123
abc123
abc123
abc123
abc123
abc123
Wanted output of program or something close to this:
if same:
file1.txt and file2.txt are identical.
-------------------------------------------------------
if diffrent:
file1.txt and file2.txt are diffrent.
Occurance 1:
file1.txt has an occurance at line: # column: #
Diffrence present in:
****************************************
^
file2.txt has an occurance at line: # column: #
Diffrence present in:
****************************************
^
-------------------------------------------------------
if diffrent:
file1.txt and file2.txt are diffrent.
Occurance 2:
file1.txt has an occurance at line: # column: #
Diffrence present in:
****************************************
^
file2.txt has an occurance at line: # column: #
Diffrence present in:
****************************************
^
-------------------------------------------------------
etc.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data 29th British National Conference On Databases Bncod 2013 Oxford Uk July 2013 Proceedings Lncs 7968

Authors: Dan Olteanu ,Georg Gottlob ,Christian Schallhart

2013th Edition

3642394663, 978-3642394669

More Books

Students also viewed these Databases questions

Question

Explain the activity of the appetite hormones insulin and leptin.

Answered: 1 week ago