|
-
Sep 2nd, 2001, 10:27 AM
#1
Thread Starter
Member
please try to help...
hi, i just got borland 5.0 about 2 days ago, and ive been following this hello-world example, and messing around on my own...but anyways, heres my code:
Code:
#include <iostream.h>
int main()
{
cout<<"Hello World!";
return 0;
}
now ... it works, but, it automatically exits the program itself...
too fast to even see what it says...
how would i make it so that the user could exit when they wanted?
or exit after 5 seconds?
-
Sep 2nd, 2001, 10:43 AM
#2
Code:
#include <iostream.h>
int main()
{
int x;
cout<<"Hello World!";
cin >> x;
return 0;
}
Z.
-
Sep 2nd, 2001, 11:02 AM
#3
Addicted Member
you could also try to write
cin.get();
cin.get();
after the cout-line. This makes the program need two enter-presses before exiting.
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
|