CSci351 Introduction to File Processing: Homework 2

Due date: Friday, February 15, 2008 in class
Each homework may have a different weight, which depends on its level of difficulty.
Absolutely no copying others' work

  1. Rewrite the extraction(>>) operator of the file readstr.cpp of Figure 4.4 (Page 124) in textbook, so that it uses the following field representations:     (70%)






  2. Suppose you need to keep a file in which every record has both fixed- and variable-length fields. For example, suppose you want to create a file of employee records, using fixed-length fields for each employee's ID (primary key), sex, birth date, and department, and using variable length fields for each name and address.     (30%)