Question: This is my code below that I have finished. This code will allow the user to lookup and a search for a users address, name,

This is my code below that I have finished. This code will allow the user to lookup and a search for a users address, name, date of birth, finincal inofrmation and more. This will allow the user to look at all the information the useser has enter. I also want to add a filter so the user can search for information by a specific category. when when the user open the txt file. and the user should be able to search by different .txt files. Can you see if this code is coorect and if there is something wong witht the code can you fix it and explain what you did.

#include

#include

#include

using namespace std;

struct menu

{

char menu;

};

class menuclass{

public:

void menu() {

}

};

int main()

{

menuclass menuobject;

menuobject.menu();

string menu7, enter,showresults, choice;

string repet;

int menu;

int ch=-1;

struct menu;

string search;

while(ch!=-1)

cout << "Please pick one of the following drinks below" << endl;

cout <<"1.Display all of the clients information"<< choice<

cout <<"2.Search for first name" << choice<< endl;

cout <<"3.Search last name"<< choice<< endl;

cout << "4)" << "lemonade" << endl;

cout << "5)" << "water " << endl;

cout <<" Please enter your choice ";

getline (cin, choice);

cout<< "Please enter your search ";

getline(cin,search);

cin >> showresults;

cout <<"6. Do you want to continue and repet previous choice"<

cin>> repet;

cout <<"exit"<

cin >> menu;

{for(int x=0;x<1; x++)

cout<<"this is a loop ";

};

switch (menu)

{

case 1:

cout << "display all" << endl;

cout << "You have pressd 1" << endl;

break;

case 2:

cout << "Search for first name" << endl;

cout << "You have pressed 2" << endl;

getline(cin,enter);

{for(int x=0;x<1; x++)

cout<<"this is a loop ";

};

break;

case 3:

cout << "orange crush" << endl;

cout << "enjoy your orange crush" <

break;

case 4:

cout << "lemonade" << endl;

cout << "enjoy your lemonade" << endl;

break;

case 5:

cout << "water" << endl;

cout << "enjoy your water" << endl;

break;

case 6:

cout <<"repet"<

cout <<" You have chosen to repet your previous choice"<

if(choice<=choice<=0)

{

cout<<" invalid choice"<

}

}

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!