ok so i posted earlier and finally fixed my problems with those files, however now i have 2 errors with my Menu.cpp file
#include "Menu.h"
#include <iostream>
//additional includes
using namespace std;
//int main ()
Menu::Menu()
{
}
void Menu::display_main_menu() const
{
cout << "Here is the MAIN MENU \n";
cout << "1.Info \n";//AC
cout << "2.Read \n";//AC
cout << "3.Show \n";//AC
cout << "4.Find \n";//AC
cout << "5.Update \n";//AC
cout << "6.Exit \n";//AC
}
void Menu::display_info() const
{
cout << "Here is the Info requested \n";//display Project Part I, team name and team members
cout << "Project Part 1 \n";//AC
cout << "Team name: Group 11 \n";//AC
cout << "Alyssa Carrillo, Kenyon Cavender, Chris Carter \n";//AC
}
void Menu::read()
{
//cout << "Read file name then read store data \n";
cout << "1. Category and Product Data \n"; //kc
cout << "2. Customer Data \n";//kc
cout << "3. Cart Item Data \n"; //kc
char data_type;//kc
cin >> data_type;//kc
if (data_type == '3'){
string name;
cin >> name;
ifstream ist(name.c_str());
if (!ist) error("can't open input file ",name);
vector<Cart>temps;
int n1;
int n2;
int y;
int m;
int d;
dd = Date;
while (ist>>n1>>n2>>y>>m>>d){
temps.push_back(Cart(n1,n2,Date(y,Date::Month(m),d)));
}
}
else if (data_type == '2'){//kc
cout << "Please enter input file name: ";//kc
string name;//kc
cin >> name;
ifstream ist(name.c_str());//kc
if (!ist) error("can't open input file ",name);//kc
vector<Address>temps;//kc
string company;//kc
string product;//kc
int number1;//kc
int number2;//kc
int number3;//kc
while (ist>>number1>>company>>number2>>product>>number3){//kc
temps.push_back(Address(number1,company,number2,product,number3));//kc
}}//kc
else if (data_type == '1') { //kc
cout << "Please enter input file name: "; //AC
string name; //Ac
cin >> name; //AC
ifstream ist (name.c_str());//AC
if(!ist) error("can't open input file ",name);//AC
vector<Category>cats;//AC
int cat_Number;//AC
int cat_id;//AC
string cat_name;//AC
ist>>cat_Number;//AC
for (int i=0; i<cat_Number; i++)//AC
{
ist>>cat_id>>cat_name;//AC
Category r= Category (cat_id,cat_name);//AC
cats.push_back(r);//AC
//while (ist>>Product_number) {
//cats.push_back(Category(Product_Number,Products));
//}
Menu.cpp: In member function `void Menu::read()':
Menu.cpp:53: error: `dd' was not declared in this scope
Menu.cpp:53: error: expected primary-expression before ';' token
void Menu::read()
{
//cout << "Read file name then read store data \n";
cout << "1. Category and Product Data \n"; //kc
cout << "2. Customer Data \n";//kc
cout << "3. Cart Item Data \n"; //kc
char data_type;//kc
cin >> data_type;//kc
if (data_type == '3'){
string name;
cin >> name;
ifstream ist(name.c_str());
if (!ist) error("can't open input file ",name);
vector<Cart>temps;
int n1;
int n2;
int y;
int m;
int d;
dd = Date; ///////