Permalink
Cannot retrieve contributors at this time
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?
PineapplePen/menuoptions.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (30 sloc)
926 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |