Hi all,
Just a quick question,
Is it possible to use the system ("pause") function with
the Borland compiler?
The reason i ask is im at work, so i cant test it.......
If it doesnt work, is there an equivalant?
Thanks alot,
Boontune
Hi all,
Just a quick question,
Is it possible to use the system ("pause") function with
the Borland compiler?
The reason i ask is im at work, so i cant test it.......
If it doesnt work, is there an equivalant?
Thanks alot,
Boontune
best way to find out is try
header file is stdlib.h //i think its early its that or conio.h....
if it doens't work, dependsing on how your pausing it,
include conio.h and use getch();
getch() Holds the program until a key is pressed (that is, if the
buffer is empty), and sleep() pauses it for an amount of
milliseconds so a not that good alternative.
<windows.h> has sleep() if im not mistaking.
It's Sleep(), i.e. with a capital 'S', and is an API routine so should be implemented. Read the FAQ for why you should not use system().
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
yes it works with borland compiler. just dont forget to include
" cstdlib " or if that doesnt work then stdlib.h should do.
can use getch() (in conio.h) also.
"If knowledge can create problems, it is not through ignorance that we can solve them. "
-Isaac Asimov(1920-1992)
Thanks alot guys
Boontune
In VC++, system() is also in <process.h> (or maybe if that doesn't work: <process>). So since that hasn't been mentioned try it out for Borland. hehe!
Why suggest platform dependant routines for such a trivial problem? Use cin.get()
>>> Why suggest platform dependant routines for such a trivial problem? Use cin.get()
He stated he was using a Borland compiler, so his platform is fixed. There is nothing wrong in using a platform specific solution if you know your program will not be loaded on another platform. There are, however, problems associated with recommending legacy calls, like system(), they're in the FAQ.
Duuur, FAQ?
Frequently Asked Questions...
http://www.cprogramming.com/boardfaq.html#pause
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.