Results 1 to 3 of 3

Thread: Very newbie

  1. #1

    Thread Starter
    Addicted Member kikelinus's Avatar
    Join Date
    Nov 2000
    Posts
    219

    Very newbie

    Everyday i make a program in c++ (simple ones, I just started learning)....say for example a Hello World program, when I run it, the console window only shows up for about a second, and then the program ends....

    How can I make it stay open?

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    don't make simple ones

    Actually, i use to press ctrl+f5 to compile and it ask me to press any key to continue. Otherway you could always use cin
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    cin makes your program stay open until something is entered

    PHP Code:
    char cBuff[256];
    cout << "Enter comething to Quit!\n";
    cin >> cBuff
    VS.NET 2003

    Need to email me?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width