Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef MENUOPTIONS_H
#define MENUOPTIONS_H
#include <iostream>
#include <string>
using namespace std;
class Menu;
class MenuSwitch //class name
{
public: //access specifier
MenuSwitch() // default constructor
{
currentMenu = NULL; // null pointer variables. Used when you dont have exact address.
menuOption[1] = NULL;
menuOption[2] = NULL;
menuOption[3] = NULL;
menuOption[4] = NULL;
};
void assignMenu(Menu* playermenu, Menu* jobmenu, Menu* librarymenu, Menu* gymmenu) //member functions
{
currentMenu = playermenu; //starts at main menu
/*menuOption[1] = mainmenu; *///changes menu depending on input
menuOption[1] = playermenu;
menuOption[2] = jobmenu;
menuOption[3] = librarymenu;
menuOption[4] = gymmenu;
}
Menu* currentMenu; //pointer to class Menu with value held in currentMenu
Menu* menuOption[4]; // pointer to class Menu with value held in menuOption
};
#endif