Thread: Just need some sugjestions

  1. #1
    Registered User mill1000's Avatar
    Join Date
    Nov 2001
    Posts
    43

    Smile Just need some sugjestions

    i have got this menu program and i dont know wat to put in it i am no good at game programing any sugjestions.

  2. #2
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    hmmm

    let us see it?
    +++
    ++
    + Sekti
    ++
    +++

  3. #3
    Registered User mill1000's Avatar
    Join Date
    Nov 2001
    Posts
    43

    Post

    he it is


    #include <stdio.h>
    #include <stdlib.h>
    #include <iostream.h>
    int main()
    {
    int sel;
    while (sel>4 || sel<1)
    {
    cout<<"1. \n";
    cout<<"2. \n";
    cout<<"3. \n";
    cout<<"4. Exit\n";
    cout<<"Enter selection 1, 2, 3 or 4: ";
    cin>>sel;
    if (sel>4 || sel<1)
    {
    cout<<"Error! No such input.\n";
    }
    else
    {
    }
    switch (sel)
    {
    case 1:

    break;
    case 2:

    break;
    case 3:

    break;
    case 4:
    return 0;
    }
    }
    }

  4. #4
    Registered User
    Join Date
    Mar 2002
    Location
    South Africa
    Posts
    35
    Well, how about putting whatever you want your program to do upon each response in seperate functions, and then just call the functions in that switch statement?

  5. #5
    Registered User mill1000's Avatar
    Join Date
    Nov 2001
    Posts
    43

    Hmmm

    i dont have a program to put in. i am asking some one on what i sould put there

  6. #6
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    Aaah......if this is your program, shouldnt you be the one deciding the stuff in the menu???
    I mean, we don't even know what this program's gonna be about.

  7. #7
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    Here are some suggestions...

    ----
    case 1:
    increase_ihsir_posts_by1000();
    break;
    case 2:
    crack_univ_comp();
    top__the_class();
    break;
    case 3:
    get_me_some_money();
    break;
    ---

    just seeing your code, here are some tips-

    use do-while, sel has not been initialized to be between 1-4
    put return 0 before last } and not in case 4
    -

  8. #8
    Registered User mill1000's Avatar
    Join Date
    Nov 2001
    Posts
    43

    Wink

    thanx but no thanx i think i got my own ideas now

  9. #9
    Registered User biosx's Avatar
    Join Date
    Aug 2001
    Posts
    230
    Original thinking? Who thunk it?!



Popular pages Recent additions subscribe to a feed