Originally Posted by
Rodaxoleaux
Help with... what? You want us to decipher an error in your code that is part of the plan you have already elaborately planned out and tried to program correct? If not and you just want to "c da codes pls", you're at the wrong place.
No......
this is the code i have now , but i couldnt get it working at all , it comes up with to many errors
Hi im trying to get this to compile im try to make a menu this is my code but it wont work
Code:
//main.cpp
#include <iostream>
#include "Menu.h"
using namespace std;
int main(){
{
SportsClothingMenu mysport();
}
system("pause");
return 0;
}
Code:
//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
Code:
//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);
}
};
would you be kind enough to help me out ?