Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Simple 'cin' question Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Gf11speed

May 14, 2005, 11:34 PM

How come when I call cin two consequtive times, the second time it is not recognized. For instance:

  1.  
  2. cin >> var;
  3. cin >> var;
  4.  


Why is the second call to cin not recognized? I'm confused...

 
Betelgeuse

May 15, 2005, 11:42 AM

Mebbe you are hitting enter between your entries, and the enter gets passed on to the next cin... try flush.. or cin.ignore

 
 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.