Re: [Dev-C++] differnece between system pause and cin.get()
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Robson B. <rob...@su...> - 2003-02-17 23:55:27
|
the function system() is a shortcut to use dos comands like system("ATTRIB")
or system("PAUSE"). cin.get() is a c++ function that you can adjust
settings. is more flexible. that was what i verified.
[]'s
----- Original Message -----
From: Catsquotl
To: dev...@li...
Sent: Monday, February 17, 2003 8:21 PM
Subject: Re: [Dev-C++] differnece between system pause and cin.get()
At 00:24 18-2-2003 +0200, Ioannis Vranos wrote:
-------Original Message-------
From: Catsquotl
Date: ÄåõôÝñá, 17 ÖåâñïõÜñéïò 2003 2:21:19 ìì
To: dev...@li...
Subject: [Dev-C++] differnece between system pause and cin.get()
Hello,
Obviously there are quite a lot of differences between the two.
However since I am new to c++ and pragramming all together i was
wondering
why cin.get()
works sometimes to pauze the system after a programm and sometimes it
won`t.
==> Because one or more '\n' has remain in the stream from previous cin
use(s).
Thanks for the response.
Is there a way of chekking if there`s annything left in the cin stream.
Or to empty it for that matter before using it as a tool for keeping dos
boxes open :-)
greets Cat
|