How do I flush the input stream?

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: How do I flush the input stream?

 
0
  #21
Dec 18th, 2008
Originally Posted by Traicey View Post
Why should you complicate things while there is a easy way out, I mean C++ alone is complicated
I totally agree with you, all you want to get is one line of string and see what you are supposed to do, as if it is rocket science..
Due to lack of freedom of speech, i no longer post on this website.
Quick reply to this message  
Join Date: Dec 2008
Posts: 16
Reputation: gurshan is an unknown quantity at this point 
Solved Threads: 0
gurshan gurshan is offline Offline
Newbie Poster

Re: How do I flush the input stream?

 
-3
  #22
Dec 29th, 2008
void main( )

{

char str1[10], str2[10] ;

cin.getline ( str1, 9 ) ;

cin.getline ( str2, 9 ) ;

cout << str1 << endl << str2 ;

}
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC