< previous page page_802 next page >

Page 802
Module Structure Chart:
0802-01.gif
//******************************************************************
// Friends program
// This program creates an address book by reading first names,
// last names, phone numbers, and birth dates from standard input
// and writing an alphabetical listing to an output file
//******************************************************************
#include <iostream.h>
#include <iomanip.h>    //For setw()
#include <fstream.h>    //For file I/O
#include <string.h>     //For stramp()
#include <ctype.h>      //For toupper ()
#include bool.h       //For Boolean type

const int MAX_FRIENDS = 150;    // Maximum number of friends

typedef char String8[9];        // Room for 8 charcrters plus \O
typedef char Stringl5[16];      // Room for 15 charcters plus \O

struct EntryType
{
    Stringl5 firstName;
    String15 lastName;
    int      areaCode;      // Range 100.999
    String8  phoneNumber;
    int      month;         // Range 1..12
    int      day;           // Range 1..31
    int      year;          // Range 1900..2100
};

 
< previous page page_802 next page >