|
-
March 7th, 2009, 03:24 AM
#1
cin '>>' question about buffer
Hello! I am new to this forum and I like C++ programming. But I have one question:
If cin>> leaves '\n' in the buffer, why this:
cout<<"Write your age: ";
cin>>age;
cout<<"Write whatever: ";
cin>>whatever;
cout<<"Write etc....";
cin>>etc;
works perfectly, without any errors?
Thanks in advance.
Regards.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|