Thread: cin.get(); problem

  1. #16
    Registered User
    Join Date
    Dec 2006
    goto sucks instead of "GOTO" use functions....such as main();
    to exit you can use system("cls"); or exit(0); with a stdlib.h header file in the includes...

    both syntax works on Dev-C++ 4.9.9 or Visual 2005

  2. #17
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    use functions....such as main();
    don't give wrong advices.
    1. main is special function that should not be called directly from the code
    2. using recursion to emulate loops - bad idea - stack size is not infinite
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  3. #18
    Registered User
    Join Date
    Jan 2005
    and int main() not void main().

  4. #19
    Registered User
    Join Date
    Sep 2005
    Quote Originally Posted by h_howee
    >>It would be a good thing *not* to use goto in such simple cases.

    Its never a good thing to use gotos
    WhAtHA hell Is GoInG ON

  5. #20
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    There are only a handful of reasons to use goto. None of them I appreciate much except the one about text parsers.

    Search the forums for this keyword. There's heaps of posts about it.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  3. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  4. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM