Question: Help writing a program in C++ that searches a text file (that has no spaces in it) named input.txt for the substring that is the
Help writing a program in C++ that searches a text file (that has no spaces in it) named input.txt for the substring that is the longest without repeating characters. A program must be written in main to read and process input.txt, and the then the output will be in output.txt. Use a function to determine the substring and length of the substring instead of writing the entire program in the main function. The output in output.txt must be formatted neatly (use setw).
.
.
Ex:
input.txt contains:
qwhgjuiopqihjk
abc
b
mmmmmm
.
.
output.txt will contain the text from input.txt followed by the substring and number of characters in the substring:
qwhgjuiopqihjk qwhgjuiop 9
abc abc 3
b b 1
mmmmmm m 1
.
.
If possible please explain the process of the code for help in better understanding! Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
