|
-
Jan 25th, 2002, 05:35 PM
#1
Thread Starter
Addicted Member
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?
-
Jan 25th, 2002, 05:55 PM
#2
transcendental analytic
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.
-
Jan 25th, 2002, 07:07 PM
#3
Hyperactive Member
cin makes your program stay open until something is entered
PHP Code:
char cBuff[256];
cout << "Enter comething to Quit!\n";
cin >> cBuff;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|