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


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

Re: Some Basics - strings and Conversions

From drew@furrfu.invalid (Drew Lawson)
Newsgroups comp.lang.c++
Subject Re: Some Basics - strings and Conversions
Date 2012-04-17 13:50 +0000
Organization Center for Unverified Assertions
Message-ID <jmjseh$okh$1@raid.furrfu.com> (permalink)
References <MPG.29f6542782c9bee9896fe@news.eternal-september.org> <9v47iaFoqtU1@mid.individual.net>

Show all headers | View raw


In article <9v47iaFoqtU1@mid.individual.net>
	Ian Collins <ian-news@hotmail.com> writes:
>On 04/17/12 11:07 AM, Mike Copeland wrote:
>>     In the following code, even though the program executes, the 2nd
>> prompt fails to process data.  The 1st prompt requires 2 returns (why is
>> that?), but the 2nd doesn't: it prompts, waits for data, and goes on to
>> the last "cout" with no value in "quantity".
>
>It shouldn't.  What platform are you using?

The description of behavior sounds like things are working, but he
doesn't see the second prompt until after pretting return the second
time.

I forget the rules, but see that the prompts are not newline terminated.
Does he need to explicitly flush cout, or does reading cin trigger that?


-- 
                        | Stories of tortures used by debauchers
 Drew Lawson            | lurid, licentious and vile
                        | make me smile

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


Thread

Some Basics - strings and Conversions mrc2323@cox.net (Mike Copeland) - 2012-04-16 16:07 -0700
  Re: Some Basics - strings and Conversions red floyd <no.spam.here@its.invalid> - 2012-04-16 16:50 -0700
    Re: Some Basics - strings and Conversions mrc2323@cox.net (Mike Copeland) - 2012-04-17 14:59 -0700
      Re: Some Basics - strings and Conversions Ian Collins <ian-news@hotmail.com> - 2012-04-18 10:43 +1200
        Re: Some Basics - strings and Conversions mrc2323@cox.net (Mike Copeland) - 2012-04-17 20:43 -0700
          "ThePirateBay.SE" has a cracked copy of Visual Studio 2010.  @Jeff-Relf.Me - 2012-04-17 20:55 -0700
          Re: Some Basics - strings and Conversions Miles Bader <miles@gnu.org> - 2012-04-18 13:27 +0900
            Re: Some Basics - strings and Conversions Miles Bader <miles@gnu.org> - 2012-04-18 13:31 +0900
            Re: Some Basics - strings and Conversions drew@furrfu.invalid (Drew Lawson) - 2012-04-18 17:33 +0000
  Re: Some Basics - strings and Conversions Ian Collins <ian-news@hotmail.com> - 2012-04-17 15:49 +1200
    Re: Some Basics - strings and Conversions drew@furrfu.invalid (Drew Lawson) - 2012-04-17 13:50 +0000

csiph-web