The C++ equivalent would be <cstdio>!
--Matt
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Thomas
Smith
Sent: Thursday, July 14, 2005 3:57 PM
To: dev...@li...
Subject: RE: [Dev-C++] Nead help with my program
Wouldn't it be more appropriate to use the getchar() function? This will
effectively pause the program until the user presses Enter to exit it.
Add something like
printf("Press any key to continue...");
getchar();
Return 0;
to your program. You may need to include <stdio.h>. This function is
included in stdio.h in C--I don't know the C++ equivelant, if there is one.
This function will achieve the same effect that "system("pause");" does
while avoiding calls to the host OS.
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
|