Results 1 to 2 of 2

Thread: cin problem SIMPLE

  1. #1

    Thread Starter
    Hyperactive Member WP's Avatar
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    278

    Angry

    Hi,

    I'm new in C++, and I've a problem: When I use 'cin>>' the first time, it works good, but when I use it later again, it doesn't ask any input !

    WP

    Visual Basic 6.0 EE SP5 / .Net
    Windows XP

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    When you use the >> operator on cin, whitespace is ignored.

    You could use a function like cin.getLine if you need everything.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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