stack project!!

can somebody help us with our project?
how to create a menu using stack? #include <stack>

this would be the output:

=====menu=====
category
a. hiphop
b. rnb
c. opm
d. rock
e. lovesong
choose:

(each category has 5 songs)
help me plssssss :((((
Can somebody help us with our project?

It would be strange. Is it a team or something?
Anyways, the project is just as delicious as cake. Show us what you've got here (your code), so that we can help you.
this is what weve got, but its incomplete & definitely wrong coz its not stack -__-


#include<iostream>
#include<string>
#include<stack>
using namespace std;

void showMenu();
void mmm();
char gc();
char hh();

int main()
{
bool quit = false;

while (!quit)
{
showMenu();
char ch = gc();
switch(ch)
{
case 'A':
{
mmm();
int pp = hh();
switch(pp)
{
case 1:
//
break;
case 2:
//
break;
case 3:{}
//
break;
case 4:
//
break;
case 5:
//
break;
case 6:
//
break;
}
}

// handle choice A
break;
case 'B':
// handle choice B
break;
case 'C':
// handle choice C
break;
case 'D':
//D
break;
case 'E':
//E
break;
case 'F':
quit = true;
break;
}
}

return 0;
}


char gc()
{
cout << "\nEnter choice: ";
char ch;
cin >> ch;
cin.ignore(255, '\n');

return toupper(ch);
}

void showMenu()
{
cout<<"\nA\tHiphop";
cout<<"\nB\tRNB";
cout<<"\nC\tOPM";
cout<<"\nD\tRock";
cout<<"\nE\tLoveSong";
cout<<"\nF\tExit";
}

char hh()
{
cout << "\nEnter choice: ";
char hh;
cin >> hh;
cin.ignore(255, '\n');
return 0;
}

void mmm()
{
system("CLS");
cout<<"1.hehe"<<endl;
cout<<"2.huhu"<<endl;
cout<<"3.lol"<<endl;
cout<<"4.nye"<<endl;
cout<<"5.haha"<<endl;
cout<<"6.Back to menu"<<endl;
}
What logical operation in your program does need a stack?
@keskiverto,
What logical operation in your program does need a stack? . I believe the idea is to put the menu in a stack. Must be a learning experience, I learned from it.

Hello dendimon,

Please use only one thread per topic. I left you an answer in your other topic. More work than needed, but it works.

Andy
Topic archived. No new replies allowed.