Making a Dictionary In C

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Tevren

Thread Starter
Joined
Dec 8, 2001
Messages
1
Hey, guys i am in deep crap, i have a homework due soon!! For this i have to make a dictionary in C. It will ask the user what the user wants to know, then the user will enter whatever he/she wants and if it there then it will give the definition. If its not there then it will ask the user if the user wants to enter it in the data base. HOW DO I DO THIS????? PLEASE HELP!!!!!

A.The program should handle the the following errors reasonably:
You must use a multiple-file structure for your code. Exactly how you break up the program is up to you, but remember that the goal is to make easily-reusable, easy-to-read code grouped into similar functions, and your grade will depend partly on how well you meet this goal.

B.You are welcome (and encouraged!) to use libraries that have been provided in class examples in your program. (E.g., input.h/input.c.) But you must have at least one .h/.c pair that you have created yourself for this program.

C.You must use char * (rather than char arrays) to hold the words (using a temporary array when getting input is still okay). Note that this will require you to use malloc() to set aside memory for the strings! Don't forget that you must have a free() to match every use of malloc().

D.You must use command-line argument processing, with one optional command-line argument (the name of the dictionary file) and one required command-line argument (the name of the file to spell-check).

Your program should handle the following errors reasonably:
1.User forgets to enter a file to spell-check
2.Dictionary file doesn't exist yet
3.File to spell-check doesn't exist or isn't readable
4.User doesn't enter y or n at the prompt
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top