< previous page page_1006 next page >

Page 1006
#ifndef RECLIST_H
#define RECLIST_H

#include bool.h
#include <fstream.h>   // For file I/O

const int MAX_EMPL = 1000;      // Maximum number of employees

typedef char String20[21];      // Room for 20 characters plus \0
typedef char String100[101];    // Room for 100 characters plus \0
typedef char String200[201];    // Room for 200 characters plus \0

struct AddressType
{
    String20 street;
    String20 city;
    String20 state;
};
struct PersonnelData
{
    String20    lastName;
    String20    firstName;
    AddressType address;
    String200   workHistory;
    String100   education;
    String200   payrollData;
};

typedef PersonnelData* PersonPtr;

class RecordList
{
public:
    void ReadAll( /* inout */ ifstream& inFile,
                  /* out */   Boolean& outOfMem );
        // Precondition:
        //     inFile has been opened for input
        //  && inFile contains at most MAX_EMPL records
        // Postcondition:
        //     List contains employee records as read from inFile
        //  && IF there was not enough memory for all input records
        //           outOfMem == TRUE
        //        && A warning message is printed
        //     ELSE
        //           outOfMem == FALSE

 
< previous page page_1006 next page >