CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    34

    Probably an easy one

    Hi,

    Suprisingly, I can't find much information on the following:

    cout << "Enter the container size (0.48/0.95/3.78/19): ";
    cin >> canSize;

    Now, say the user just hits enter. What I get is a dead cursor that will not do anything further.

    I know this must be something with istream, but I'm not sure where to dig up the info.

    Any help?

    Thx

  2. #2
    Join Date
    Jan 2004
    Location
    Earth
    Posts
    567
    Are you using a loop in the program after the cin statement?

    TDM

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757
    One solution is a loop. Another solution is to read in istream one line at a time via std::getline().

    Kuphryn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured