Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
its my humble request to you to give answer of this question-------------------------- write a program to save a phone contact and search by name.[ by using structure and function] ??? c++

What I have tried:

its my humble request to you to give answer of this question-------------------------- write a program to save a phone contact and search by name.[ by using structure and function] ??? c++
Posted
Updated 29-Jan-17 22:40pm
Comments
PIEBALDconsult 30-Jan-17 0:01am    
You'll never get anywhere in life like that.

What have you tried?
Quote:
What I have tried:

its my humble request to you to give answer of this question-------------------------- write a program to save a phone contact and search by name.[ by using structure and function] ??? c++

So, you did nothing.

Sorry, but if you don't even try, there is no point showing you the answer. So, here is what you should do:

1. Look up C++ tutorials on how to use a function, array, and struct. Learn to use them in an actual program with some simple examples. Make sure you understand how each of them is used.

2. Think about your problem and write down some 'pseudocode' that should solve the task.

3. Turn that pseudocode into actual C/C++ code using your knowledge of functions, array and structs. Try to build the code and fix compiler errors until you get it to compile correctly.

4. Test your program to see what it does. Likely it will not work correctly on your first try. So, use the debugger and find out if your program behaves like you thought at every step in your program.

5. If you still have trouble fixing your program, come back here, describe what you did, show your program, and ask for help.

Then, you will get help.

If you fail at step 1, learn to use google or any other search engine that you like

If you fail at step 2, search for 'pseudo code' to understand what that is, and how to create it.

If you fail at step 3, you may come here and ask, specifically, how to express a certain action in C/C++. But don't ask for the entire program - we expect you to sincerely try yourself before coming here for help.

If you fail at step 4, that would be understandable: testing and using a debugger efficienly is something that needs experience. Please do your best to at least try it, then come here and tell us what you did, and what you need help with. Don't forget to tell us which compiler and debugger you are using - each works differently.
 
Share this answer
 
 
Share this answer
 
Comments
Anuj Dangi 30-Jan-17 0:40am    
program to save a phone contact and search by name.[ by using structure and function] ??? c++
Anuj Dangi 30-Jan-17 0:44am    
question is that
for example name ANUJ number 7000929689
both are saved in program and search by name
my question is to how to save contact and search by name by using
ARRAY,STRUCTURE,AND FUNCTION
Ashwin. Shetty 30-Jan-17 0:48am    
The article does have feature to add and search in an array. To be specific search feature is available here http://fahad-cprogramming.blogspot.in/2014/02/linear-search-program-in-c-using.html
Anuj Dangi 30-Jan-17 1:17am    
the link you provide the program i copy and paste in turbo c++ but is has 6 errors
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.

As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.

Quote:
its not a homework i trying to do so i was in class 11 but the telephone directory is in class 12

So, it is self assigned homework from next class and you wonder why you are missing knowledge ?
 
Share this answer
 
v2
Comments
Anuj Dangi 30-Jan-17 1:20am    
its not a homework i trying to do so i was in class 11 but the telephone directory is in class 12 by using class function but i trying to do so with using structure and function and array
[no name] 30-Jan-17 7:08am    
Ah, that clears things up. It *IS* a homework assignment. And what you posted isn't even remotely a question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900