cp50710 - ECE 3331 COMPUTER PROBLEM 5 Spring 2007 (due 5pm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 3331 COMPUTER PROBLEM 5 Spring 2007 (due 5pm 4/17/07) One of Dr. Barr's vices is an addiction to mystery novels. She has a plain text file, cleverly named books.txt, containing her current inventory. Each line corresponds to a book. For each book, there is the title followed by the name of the author (last name,first name), followed by either the letter P if it is a paperback or the letter H if it is a hardback. The pieces of information are separated by semicolons. The sequence of the entries is simply the sequence in which she acquired them. This has become increasingly difficult to manage "by-hand", and so she needs your help. You are to write a standard C program that will read her current inventory and create a singly-linked list of books using the following template: typedef struct books { char *title; char *author; char kind; struct books *next; } BOOKS; Note that we are NOT allocating memory for the title and author within the struct—instead, you must dynamically allocate the memory required according to the number of characters in each, and store...
View Full Document

This note was uploaded on 10/26/2011 for the course ECE 3331 taught by Professor Staff during the Fall '08 term at University of Houston.

Ask a homework question - tutors are online