Question: I'm using shell script in mobaXterm. You are to create a C++ program that opens an input file, reads and process the data in that

I'm using shell script in mobaXterm.

You are to create a C++ program that opens an input file, reads and process the data in that file, and then writes the (possibly modified) data to a new output file. Your program should:

Accept arguments that are presented on the command line (see Usage box below).

Use the Templatized C++ Command Line Parser for argument processing (See the Templatized C++ Command Line Parser below). Illegal or missing options should be handled properly.

Store the parsing results into a C++ STL map. The map file must be indexed by a C++ enumerated list (enum) and should hold strings for values.

Within your code, you must query your map to get the values of the parsed command line arguments. Finally, your program must present the correct behavior. The behavior is:

USAGE: ./program2 [-l] [-u] [-o ] [--] [--version] [-h]

Where: -l, --lower Convert all text to lowercase

-u, --upper Convert all text to uppercase

-o , --outfile The name of the output file

--, --ignore_rest Ignores the rest of the labeled arguments following this flag.

--version Displays version information and exits.

-h, --help Displays usage information and exits.

(required) Input file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!