-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The C++ Programmer's Mindset
By :
Our first task is to set up a command-line interface for the application that provides our solution to the challenge set out in Chapter 7. This will be the main way the user interacts with the application and contains most of the feedback mechanisms that they can use to understand what our program is doing, such as logging. A good interface is expressive but minimal and well defined; the interface should give good feedback if the user provides a bad argument and provide ample usage information. This chapter shows how we set up the interface, including the command-line parser, and some ancillary functionality, such as logging and error handling, at a high level. This is a very minimal interface, but leaves open the possibility for easy expansion later.
At the very least, this interface needs to parse the command-line arguments to obtain the list of files that should be processed. However, there are a few other things we want to control too...