T
The_Kingpin
Hi all,
I'm new to C programming and looking for some help. I have a homework
project to do
and could use every tips, advises, code sample and references I can get.
Here's what I need to do. I have a file named books.txt that contains all
the informations
on the books. Each book is a struc containing 6 fields written on
separated line in the
folder. I need to use the fgetc command to read the info of this file.
The program must create 2 alphabetical order sorted by book's subject and
for a
same subject, the other info must be grouped by autor's name.
The second list must be created sorted in decreasing order of the book's
release date, and
for each year, the info must be grouped by subject.
Nos these two lists must also be created in another file named
booksort.txt. Each autor's
first and last name must be uniform (all lowercase except for the first
character). Also,
if a first name contains only 1 character, a '.' must follow (ie. Smith
Marc L.). If a
non-character is found ('-', ',', '.', etc.), we must replace it by a "/"
and add the
correct number of spaces (ie. Marc*Smith is now Marc / Smith)
Finaly, we must change the date's format from the current file (m/d/yyyy)
to (yyyy/mm/dd)
Looks like a lot of job to me so as I said, I'm tking anything that can
help me.
Thanks for your time and for helping a newb finding his way !
Frank
I'm new to C programming and looking for some help. I have a homework
project to do
and could use every tips, advises, code sample and references I can get.
Here's what I need to do. I have a file named books.txt that contains all
the informations
on the books. Each book is a struc containing 6 fields written on
separated line in the
folder. I need to use the fgetc command to read the info of this file.
The program must create 2 alphabetical order sorted by book's subject and
for a
same subject, the other info must be grouped by autor's name.
The second list must be created sorted in decreasing order of the book's
release date, and
for each year, the info must be grouped by subject.
Nos these two lists must also be created in another file named
booksort.txt. Each autor's
first and last name must be uniform (all lowercase except for the first
character). Also,
if a first name contains only 1 character, a '.' must follow (ie. Smith
Marc L.). If a
non-character is found ('-', ',', '.', etc.), we must replace it by a "/"
and add the
correct number of spaces (ie. Marc*Smith is now Marc / Smith)
Finaly, we must change the date's format from the current file (m/d/yyyy)
to (yyyy/mm/dd)
Looks like a lot of job to me so as I said, I'm tking anything that can
help me.
Thanks for your time and for helping a newb finding his way !
Frank