is this bad to do?

This is a discussion on is this bad to do? within the C++ Programming forums, part of the General Programming Boards category; haha i love it... lets get everyone in here for a Free for all......

  1. #16
    Registered User Liam Battle's Avatar
    Join Date
    Jan 2002
    Posts
    114
    haha i love it... lets get everyone in here for a Free for all...
    LB0: * Life once school is done
    LB1: N <- WakeUp;
    LB2: N <- C++_Code;
    LB3: N >= Tired : N <- Sleep;
    LB4: JMP*-3;

  2. #17
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    I think he's asking if code such as this is bad.

    Code:
    void game_menu()
    {
            int choice = get_input();
            switch(choice) {
            case PLAY_GAME:
                     play_game();
                     break;
            // more choices
    }
    
    void play_game()
    {
            while(!quit_game) {
                   // game stuft
                   
                   // if pressed m goto game menu
                         game_menu();
             }
    }

  3. #18
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    IMO it all depends on the situation. generally speaking its not good and is not required but if there is a case where you have to do it just take neccessary precautions for smooth running after the break.

    Originally posted by m00se123 i don't know if i mentioned that my prog does end, it just doesn't ever make to the end. i used the exit function to get out, and before i call that i call my own function to clean everything up. It is not like i just have an infinite loop.
    i dont think there would be any problem [i'm not sure] by using exit.

    Originally posted by Liam Battle
    haha i love it... lets get everyone in here for a Free for all...
    Yeah, im in for one, but maybe in the GD board

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bad and fail of steam
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 02-19-2008, 02:07 AM
  2. Can you still view the bios screen with a bad CPU?
    By HyperCreep in forum Tech Board
    Replies: 4
    Last Post: 12-31-2006, 05:57 PM
  3. data loss bad bad bad
    By RoD in forum Tech Board
    Replies: 4
    Last Post: 05-01-2003, 12:06 PM
  4. Shocking(kind of)
    By Shadow in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 12-10-2002, 07:52 PM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM

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