Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can I make it pause before closing the program output window?
I'm compiling some test programs on a windows-based system, and the windows containing my program's output are closing so quickly after my program calls exit that I can't see the output. How can I make it pause before closing?
✍: Guest
After wondering why the author of your compiler's run-time system didn't take care of this for you, simply add the lines
printf("Hit RETURN to exit"\n");
fflush(stdout);
(void)getchar();
just before the end of your program. (If you want to wait for any keystroke, not just the RETURN key
2015-04-24, 1266👍, 0💬
Popular Posts:
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...
What does a well-written Object Oriented program look like? A well-written object oriented program e...
What will be printed as the resultof the operation below: int x; int modifyvalue() { return(x+=10); ...
How can I construct preprocessor if expressions which compare strings? You can't do it directly; pre...
How To Delete All Rows a Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statement...