|
From: Per W. <pw...@ia...> - 2005-08-11 13:03:56
|
Note that system("pause") isn't portable, and that Markella did post a
solution similar in function to system("pause").
/Per W
On Thu, 11 Aug 2005, Lamana, Michael wrote:
> Sounds more like a missing 'system("PAUSE");' statement. If the input
> is the last thing in the program, it is probably just terminating
> normally and closing the shell.
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Markella
> Krisztian
> Sent: Thursday, August 11, 2005 6:14 AM
> To: dev...@li...
> Subject: Re: [Dev-C++] Execution Problem
>
> #include <iostream>
> using namespace std;
>
> int main(int argc, char *argv[])
> {
> cout << "give me a number: "; int number; cin >> number;
> cout << "you typed this number: " << number << endl;
>
> //maybe you need just this
> //you wait for an Enter and keep the window open
> fflush(stdin); cin.get();
> return 0;
> }
> Krisztian
>
> >Hi,
> >
> >Whenever I enter the input data and hit enter, the output is not
> >displayed and the run window closes immediately. i am using Dev C++
> >4.9.9.2.
> >
> >
> >
> >
> >
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices Agile & Plan-Driven Development * Managing Projects & Teams *
> Testing & QA Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|