Dear Xu,
So much the better your exec closes quickly: it means it's fast...
he, he, he!
As our colleague Tyler said, you may use system("PAUSE") and it
works perfectly well.
Alternatively, if you like, you may use cin.get(); that will halt
the program waiting for you to hit a character on the keyboard and
then <ENTER>.
It's not necessary, nonetheless, that you hit a character first:
simply hit <ENTER> and it's done.
Best,
Geraldo
If you're inquisitive to see what cin.get() returns when you hit the
<ENTER> key alone, copy and paste this into your source file:
cout << cin.get();
cin.get();
--- In [email protected], "mingyuan.xu" <[EMAIL PROTECTED]> wrote:
>
> When I run a exe,it's closed quickly. Which commond can make it
not be
> closed
>