Advertisement

Stop

Started by January 11, 2003 09:00 AM
8 comments, last by OSN 21 years, 10 months ago
This is another old question. how to stop the program, what i mean is that when someone makes an exe to his project.. when you run it it will exit... how can i repair it?
system("pause");

-eldee
;another space monkey;
[ Forced Evolution Studios ]

::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!

-eldee;another space monkey;[ Forced Evolution Studios ]
Advertisement
quote: Original post by eldee
system("pause");

-eldee
;another space monkey;
[ Forced Evolution Studios ]

::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!



is you use system ("PAUSE") i think you wil have to #include <dos.h>
Metal Typhoon
No, it''s actually in cstdlib (stdlib.h)

:::: Lektrix ::::
[ Google || ACCU || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]
I think you can just go

#include <iostream>
I think you''re wrong. cstdlib.

:::: Lektrix ::::
[ Google || ACCU || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]
Advertisement
I used to have a dummy input at the end:
cin >> dummy; will stop it, or:

while(1) {
cin >> dummy
}

You could try to use getch() or getche() that''s in the cstring header.


tcache
Contact Me
-----------
AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
tcacheContact Me-----------AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
You can also use cin.get() if you''re too lazy to incude stdio also (like me)
This will work just fine:

  #include <iostream>int main(){        //Other Code	system("pause");	return 0;}  

This topic is closed to new replies.

Advertisement