Thanks for all your help and responding so quickly. I was able to get the program to work fine by reducing the (i <= 3) to (i<=2) and keeping my MAX Length at 3 . The program will cerr any message I want if the user goes over the number of searches I have set.
My struct members are strings. Actually I got it to work by changing the quotes around the delimiters from double quotes to single quotes. Now I get an error stating "the istructions at "0x00405640" referenced memory at "0x0044ec8d"." The memory could not be...
Well, I have tried the code above and I still cannot get my search function to retrieve data. Here it is can anyone give me any suggetions? This is actually the last part of my struct.
void search()
{
//declare variables
phoneBook clients[3];
string search = " ";
{...
I see what you mean about the operators. I do not see in the code where you prompt the user to enter the information, so they can get what they are looking for from the file
Will this code return random names from my file?
Example:
cout <<"Please enter name of person's information you want: ";
cin << ssearch;
cout <<"That person's telephone extension is " << sextension << endl;
Rey
I wrote a program in C++ to enter First Name, Last Name and Telephone Extension into a file. How do I write the code to search for a specific name and return the information? I have not beeb able to found a codes that gives me that example. Can anyone please help!!
Rey
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.