-
Newb's project help
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
-
Ok, some help:
First of all you should read this concerning homework questions on the board. Then you should read this regarding general issues of posting. After you have read both of those and understand that we will not write your code for you, but you must first post your own attempt, read this thread on how to post your code using code tags.
~/
-
>Looks like a lot of job to me
That's because you're looking at the program as a whole and not in pieces like you should. Break the problem down into manageable tasks and solve them. Then put all of the solutions together and you'll have a reasonable first attempt at the program. At that point it's all glue and duct tape (which is hard enough on its own), so you've made your job scores easier.