again

This is a discussion on again within the C++ Programming forums, part of the General Programming Boards category; i made a menu, how can i get this menu back wen i want i mean after the option ends?...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    13

    Red face again

    i made a menu, how can i get this menu back wen i want i mean after the option ends?

  2. #2
    Registered User Azmeos's Avatar
    Join Date
    Jun 2003
    Posts
    65
    Make it a callable function.

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    13

    how

    how can i make it a callable function

  4. #4
    Registered User Azmeos's Avatar
    Join Date
    Jun 2003
    Posts
    65
    Code:
    int menu() {
    
    //your menu code goes here...
    
    }
    Then from your program just call it by calling menu();

  5. #5
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Probably want your program to run in a loop as well... until the user chooses a specific option, or something to that effect.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  6. #6
    Registered User Azmeos's Avatar
    Join Date
    Jun 2003
    Posts
    65
    Just in case you were thinking of it... don't use goto.

  7. #7
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Functions:
    http://www.cprogramming.com/tutorial/lesson4.html

    [edit]
    Oh yeah, nice thread title
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21