Question: Write in C++ Write a function that, given a string as input, capitalizes any repeated letters and returns a new string consisting of only these
Write in C++
Write a function that, given a string as input, capitalizes any repeated letters and returns a new string consisting of only these repeats.
Read the words (strings) from a file of the users choice in main() and write the new strings (the capitalized repeated letters) to another file of the users choice.
You have a few choice in implementation:
Use of either old style c-strings (character arrays) or the string (#include
Use of a data structure (array or vector) to store the strings. You can store the strings in such a container, or you can just read and write them without using storage.
Sample run:
Please provide the input file name: wordsin.txt
Please provide the output file name: wordsout.txt
The original text is: Rerunning programs countless times is really ridiculous.
The repeat text is: REUNIGOAMSCTL
Content has been written to the file wordsout.txt.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
