So I have made a menu and a guy helped me,
We have used enum in the menu is there anyother way i can do it, cause my teacher is not allowing me to use classes, files and arrays, please help, if u guys have anything simple and better i need it urgently..

here is the code:-

enum MenuState{MenuPlay,MenuHelp,MenuExit}; // the idea of using enum is that instead of using an int to represent a set of values, a type with a restricted set of values in used instead.
MenuState ms=MenuPlay;cout<<"                                                           *-=MOD=-* v1.0\n\n\n\n\n";
char ch=0;//or anything other than '\r'
while (ch!='\r')//IIRC getch returns '\r' when user hits enter
{
    system("CLS");

    switch (ms)
    {
        case MenuPlay:
            system("color 09");
            cout<<"                                                         *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
            cout<<b<<"                                                      --> PLAY                                                 "                                                                                                                                                                  <<b<<endl;
            cout<<b<<"                                                          HELP                                                 "                                                                                                                                                                                                       <<b<<endl;
            cout<<b<<"                                                          EXIT                                                 "                                                                                                                                                                                                       <<b<<endl;
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b;
            break;
        case MenuHelp:
            system("color 02");
            cout<<"                                                         *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
            cout<<b<<"                                                         PLAY                                                  "                                                                                                                                                                                                       <<b<<endl;
            cout<<b<<"                                                     --> HELP                                                  "                                                                                                                                                                  <<b<<endl;
            cout<<b<<"                                                         EXIT                                                  "                                                                                                                                                                                                       <<b<<endl;
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
            break;
        case MenuExit:
            system("color 0C");
            cout<<"                                                         *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
            cout<<b<<"                                                          PLAY                                                 "                                                                                                                                                                                                       <<b<<endl;
            cout<<b<<"                                                          HELP                                                 "                                                                                                                                                                                                       <<b<<endl;
           cout<<b<<"                                                      --> EXIT                                                 "                                                                                                                                                                  <<b<<endl;
            cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
            break;
        default: //always provide default, some compilers will not compile until it is there
            cout<<"ERROR: Unknown state!\n";
    }
    ch=getch();//process more input
    switch (ch){
        case 'w':
        case 'W':
        ms=MenuPlay;
        break;
        case 'e':
        case 'E':
        ms=MenuHelp;
        break;
        case 'r':
        case 'R':
        ms=MenuExit;
        break;
        default:
             break;

    }

}
//now that we are out of the loop we know that the user hit enter. now we just check ms
switch (ms)
{
    case MenuPlay:

        break;
    case MenuHelp:
        //help was selected
        break;
    case MenuExit:
        //exit was selected
        break;

}

please anything simple i need it! urgently

what are you even trying to do? if its just a menu why so complicated?

just a while loop with an input, a switch. What is so hard about that? I'm not one to judge but I also have no idea what all those "b" are. instead make a function with a for loop like ->

void lotsOfBs()
{
    for(int i = 0; i < 555;i ++)
    {
        cout << b;
        if(i == 554)
            cout << endl;
    }
}

As for the menu I'm not going to do your homework and I hope nobody here either

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.