Answer to Question #44449 in C++ for patrick

Question #44449
Declare a structure telerec in C++, containing name (20 characters) and telephone number. Write a program to maintain a file of telephone records. The program should allow the following functions on the file: 1) To append records in the file. Display the telephone number(s) for a given name. If the name does not exist then display error mess age “record not found”.
Expert's answer
structure TN{
string name;
long telephoneNumber;

};
void display(string name){
for (int i = 0 ; i < r.size() ; i++){
if (r.name == name)cout<<r.number <<endl;
return;
}
cout<<"record not found\n";
}
main (){
vector <TN> telephoneRecords;
//here you can append any number of records

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
06.08.14, 09:39

Dear visitor, 
Please submit your comment as a separate question and we will try to help you.

Assignment Expert
31.07.14, 19:14

Dear visitor, 
please use panel for submitting new questions.

shivam chawla
31.07.14, 11:06

Write a program to print all the multiplication tables from 11 to 20 up to first 10 multiples of each

shivam chawla
31.07.14, 11:05

Write a function prototype (in C++) for a function which accepts two integers as parameters and returns
their difference

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal