Hi im trying to get this to compile im try to make a menu this is my code but it wont work
//main.cpp
#include <iostream>
#include "Menu.h"
using namespace std;
int main(){
{
SportsClothingMenu();
}
system("pause");
return 0;
}
//Menu.h
#ifndef H_MENU
#define H_MENU
#include <iostream>
#include <vector>
#include <string>
using namespaced std;
class SportsClothingMenu
{
private:
Menu sportsClothingMenu;
public:
SportsClothingMenu(){}
private:
void _populate(){
Menu soccerClothesMenu("soccer");
//...add soccor clothes to soccerClothesMenu
sportsClothingMenu.add( soccerClothesMenu );
}
};
#endif
//menulmp.cpp
#include "Menu.h"
using namespace std;
struct Menu
{
std::string name; //could be menu name or a item name
std::vector<Menu> subMenus;
Menu(const std::string& name, const std::vector<Menu> subMenus): name(name), subMenus(subMenus){}
void add(const Menu& m){ subMenus.push_back(m);
}
};
i cant seem to get it working :(