We will take the final version of the carddeck.csingle-file program from Chapter 16, Creating and Using More Complex Structures, and reorganize it into multiple header files and source files. You may want to review the contents and organization of that file now before we begin.
We are going to create four .c files, each with their own .h file; we will create eight files in total. These files will be named as follows:
- card.c and card.h to manipulate the Card structure
- hand.c and hand.h to manipulate the Hand structure
- deck.c and deck.h to manipulate the Deck structure
- dealer.c and dealer.h to be the main program file; dealer.h when possible will be included in each of the source files
First, create a separate folder where these eight new files will exist. You may copy carddeck.c to this folder or you may choose to leave it in its original location. We want to copy and paste...