|
From: Shane B. <ast...@te...> - 2003-06-22 10:43:27
|
Another common solution to this is a call to the function getc(), which =
waits for the user to press a key, before continueing.
For example:
int main(void)
{
cout << "Hello World!\n";
getc();
}
To use getc(), will require the stdio.h C library, I suppose a similar =
solution is possible with cin, the opposite to cout. Also, the standard =
iostream header is require for cout/cin.
----- Original Message -----=20
From: Kevin Farrows=20
To: dev...@li...=20
Sent: Sunday, June 22, 2003 4:00 AM
Subject: RE: [Dev-C++] Beginner help
You could do
#include <stdlib.h>
then
system("PAUSE");=20
at the end of your main function.
Regards
Kevin.=20
-----Original Message-----
From: dev...@li... =
[mailto:dev...@li...]On Behalf Of Willz
Sent: 22 July 2003 10:21
To: dev...@li...
Subject: [Dev-C++] Beginner help
I have just yeaterday started to tach myself programming in c++.I =
was wondering if after you have compiled a programe and run it how to =
make it saty on the screen to view it.
I know you can open up the dos prompt and drag it into the box,it =
then shows its path at the command line then one click and enter and it =
runs.But can it be run and displayed in dev version 4 to stay on the =
screen till you close the window down.
It is mostlikely an option but with all the terms new to me i aint =
sure off what it would be called .
Thanks all...
Willz
|