Can u help me??

K

kutay0142

Using arrays and structs create a telephone list. The list should
include name, phone number and address of each subscriber. Your program
will prompt the user to choose one of the options given below:
a-Look for a phone number
b-Look for a name
c-Add a new record
d-Update phone number
e-Exit
If the first option is chosen, your program will get a name and find
and print the corresponding phone number and address

If the second option is chosen, a number is provided and the program
finds and prints the name and address.

If the third option is selected, a new entry including name, number and
address is added to the list. You should create a large enough array at
the beginning and keep track of the number of records in it. Initially
the list will be empty

The fourth option makes it possible to update a phone number given the
related name.
 
V

Victor Bazarov

[...homework assignment redacted...]

Yes, we can *help* u. However, we're not going to do it for you. You
have to make an effort beyond posting the assignment to the newsgroup.
If you can't do it at all, we can't help you, only your teacher can.

V
 
O

osmium

Using arrays and structs create a telephone list. The list should
include name, phone number and address of each subscriber. Your program
will prompt the user to choose one of the options given below:
a-Look for a phone number
b-Look for a name
c-Add a new record
d-Update phone number
e-Exit
If the first option is chosen, your program will get a name and find
and print the corresponding phone number and address

If the second option is chosen, a number is provided and the program
finds and prints the name and address.

If the third option is selected, a new entry including name, number and
address is added to the list. You should create a large enough array at
the beginning and keep track of the number of records in it. Initially
the list will be empty

The fourth option makes it possible to update a phone number given the
related name.

That sounds pretty straight forward, what part are you having a problem
with?
Eventually, you will need a menu to tie all this together. I suggest you
defer the menu, get the four functions working individually first, then do
the menu thing. Clearly the add record has to be written first since the
other functions depend on it.

How about this:

struct Record
string name
string number
string address

Record db[100]; // db - database

Keep things simple. Example: name is smith, not Charles Smith.Address is
main, maple, elm, not 1300 N. Main Street. After you get it working you can
make it pretty and cuddly.

Compile and test often. The less you type the less mistakes you will make.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,235
Latest member
Top Crypto Podcasts_

Latest Threads

Top