File Input / Output Help?
i am trying to write a program that would read data from a file and create a set of html (web) pages. How should i start?
Prompt the user for a file name, which will contain artist/CD information. Artist/CD information will include: 1) artist name, 2) format (CD, Cassette, Vinyl), 3) release date, 4) label, 5) cost, 6) image file name, and 7) biography (less than 256 characters).
India Arie CD 3/27/2001 Motown 15.99 india.jpg Recent newcomer to the music
Jill Scott CD 7/18/2000 Hidden Beach 16.99 jill.jpg Scott is a modern R&B singer from Philadelphia
Maxwell ? Cassette 8/21/2001 Columbia 17.99 Maxwell.jpg soul singer Maxwell (his middle name) had to suffer the ignominy of his record company sitting on his debut album
Where the format is: <artist first name> <artist last name> <format> <date> <label> <cost> <image name> <bio>
The fields are separated by spaces, and the biography (which includes spaces) is the last field on the line. If the artist does not have a last name, the last name field is a “?”.
Operation
You will process the data from the file (maximum of 100 artists), storing it in a struct called Artist, which should include first and last name, as well as biography. The Artist struct will include a struct called, Label, which will include the format, date, label, and cost.
Output
You will construct a sequence of web pages (see a sample web page), where each artist will have a web page, named, <artist first name>_<artist last name>.html; where of course last name may not exist. For example, “India_Arie.html” and “Maxwell.html”. Each html file is in the following format (India Arie is shown as an example):
<html>
<head>
<title>india_arie</title>
</head>
<body>
<img SRC="india.jpg" BORDER=0 height=170 width=170>
<br><b>Name</b>: India Arie
<br><b>Format</b>: CD
<br><b>Release Date</b>: 3/27/2001
<br><b>Label</b>: Motown
<br><b>Cost</b>: $15.99
<br><b>Biography</b>: Recent newcomer to the music
<br>
</body>
</html>
Hints please.