Question: // RemoveDuplicates : C++ coding using char Arrays only . NO Pointer NO STRING //Write a complete program that reads characters in from a file
// RemoveDuplicates : C++ coding using char Arrays only . NO Pointer NO STRING
//Write a complete program that reads characters in from a file and writes back out to a new file, with no repeated characters. You must use functional abstraction, including a function specifically for deleting the repeated characters. Your solution must make use of one or more partially filled character arrays. Your input filename will come from user input.
Design Requirements:
//All functionality must be abstracted tohelper functions, with themainfunctionactiving as a driver (conductor) - coordinating the big picture tasks, and invoking helper functions to do the work.
Mainmust invoke no fewer than three functions
Mainshould be no more than 20 lines of code(not including blank lines & comments)
You must have 3 separate files:p4main.cpp,p4subs.h, andp4subs.cpp
You must usearraysfor data storage and manipulation.
ADHERE TO avoidance of ALLBAD PRACTICESguidelines. Avoid globals variables
PROGRAM INPUT:
//Input file name comes from standard input (cin); a prompt may be sent to the error stream(cerr)
Program reads characters in from input file (into an array)
number of characters is unknown, but will not be more than a max constant 100
characters may appear from the entire character set, with special characters, end-of-file, and possibly 0 or more end-of-lines
uppercase and lower case are seen as unique characters, and need not be converted for comparison
if input file does not exist, the following message must be sent tostandard output(cout)and thenexitthe program with exit code 1.
ERROR - unable to open "filename" for reading.
PROGRAM OUTPUT:
//Output file name comes from standard input (cin); a prompt may be sent to the error stream(cerr)
Unique characters are written to the output file (from an array) if output file cannot be created, the following message should be sent tostandard output(cout)and thenexitthe program with exit code 1.
ERROR - unable to open "filename" for writing.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
