Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #9201

Re: cin - Why Does It Require 2 Returns?

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c++
Subject Re: cin - Why Does It Require 2 Returns?
Date 2011-08-23 08:39 +1200
Message-ID <9bft4lFs5qU3@mid.individual.net> (permalink)
References (4 earlier) <flushing-20110822202017@ram.dialup.fu-berlin.de> <9bfpasFs5qU1@mid.individual.net> <growth-20110822214337@ram.dialup.fu-berlin.de> <9bfqvfFs5qU2@mid.individual.net> <dialog-20110822221621@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 08/23/11 08:17 AM, Stefan Ram wrote:
> Ian Collins<ian-news@hotmail.com>  writes:
>> When interacting with a user, have you ever seen a case where a flush is
>> detrimental to the operation of a program?
>
>    Real-world local C++-applications are either operated from
>    the command line or have a GUI. When they are operated from
>    the command line, they are controlled by command-line
>    arguments and options and then might write output to the
>    console.

Or a log.  There a few things more frustrating than a truncated or 
incomplete entry in a log file after a crash.

>    They might even read input from ::std::cin, when
>    they behave as a »filter«, but they hardly ever start a dialog
>    with the user where they alternately ask a question and then
>    expect a user input (today, GUIs are used for such programs).

That doesn't answer my question, when interacting with a user, have you 
ever seen a case where a flush is detrimental to the operation of a program?

>    Programs that start such a dialog in a text console seem to
>    be found predominantly in C++ tutorials or text books, nowadays.

Wasn't that exactly what the original post was, a tutorial example?

-- 
Ian Collins

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

cin - Why Does It Require 2 Returns? mrc2323@cox.net (Mike Copeland) - 2011-08-20 20:49 -0700
  Re: cin - Why Does It Require 2 Returns? Geoff <geoff@invalid.invalid> - 2011-08-20 21:12 -0700
    Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-21 17:21 +1200
  Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-21 17:20 +1200
    Re: cin - Why Does It Require 2 Returns? Eugén Jung <contact@eugenjung.tk> - 2011-08-21 23:19 +0100
      Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-22 11:38 +1200
        Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-23 07:34 +1200
          Re: cin - Why Does It Require 2 Returns? Victor Bazarov <v.bazarov@comcast.invalid> - 2011-08-22 15:54 -0400
          Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-23 08:02 +1200
            Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-23 08:39 +1200
              Re: cin - Why Does It Require 2 Returns? Ian Collins <ian-news@hotmail.com> - 2011-08-23 08:57 +1200
                Re: cin - Why Does It Require 2 Returns? Paul <pchristor@yahoo.co.uk> - 2011-08-23 02:47 -0700
              Re: cin - Why Does It Require 2 Returns? James Kanze <james.kanze@gmail.com> - 2011-08-26 08:07 -0700
        Re: cin - Why Does It Require 2 Returns? James Kanze <james.kanze@gmail.com> - 2011-08-26 08:00 -0700
    Re: cin - Why Does It Require 2 Returns? Juha Nieminen <nospam@thanks.invalid> - 2011-08-22 06:13 +0000
      Re: cin - Why Does It Require 2 Returns? James Kanze <james.kanze@gmail.com> - 2011-08-22 10:49 -0700
        Re: cin - Why Does It Require 2 Returns? Juha Nieminen <nospam@thanks.invalid> - 2011-08-23 07:01 +0000
          Re: cin - Why Does It Require 2 Returns? Nobody <nobody@nowhere.com> - 2011-08-24 07:11 +0100
          Re: cin - Why Does It Require 2 Returns? James Kanze <james.kanze@gmail.com> - 2011-08-26 08:12 -0700

csiph-web