Ok I am trying to write up a data system on C++ so that when i enter in 1-10 i can choose what i want to do....but I keep on getting errors...and the people i already entered in at the bottom (the void add_record) i dont think it correct because there are about 5 of them. please help....the errors will be at the bottom
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void DisplayMenu();
int GetChoice();
bool Confirm();
void ProcessChoice(int);
int main()
{
int choice;
bool quit = false;
do
{
DisplayMenu();
choice = GetChoice();
if ( choice == 0 )
{
if (Confirm())
quit = true;
}
else
ProcessChoice(choice);
}while (!quit);
return 0;
}
void DisplayMenu()
{
cout << "1) Enter new patient\n";
cout << "2) List all smokers\n";
cout << "3) List all Male smokers\n";
cout << "4) List all Female smokers\n";
cout << "5) List all with risk factor greater than 5\n";
cout << "6) List all with risk factor less than 5\n";
cout << "7) Search by SS number\n";
cout << "8) List all by an age\n";
cout << "9) List all with HBP and HFD\n";
cout << "10) List Counts of Smokers, HFD, and HBP\n";
cout << "0) Exit\n";
}
int GetChoice()
{
int choice;
cout << " Enter a choice ";
cin >> choice;
return choice;
}
bool Confirm()
{
char choice = 'N';
bool rsp = false;
bool done = false;
do
{
cout<<" Are you sure to quit (Y/N)? "; …