![1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero 1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero](https://www.coursehero.com/thumb/ef/17/ef17f3b50a143db7fe0e6931e9ec297a75af5f07_180.jpg)
1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero
![Can you explain cin.ignore() and cin.clear() for C++? When is it appropriate to use these? How do they affect the next cin>>? - Quora Can you explain cin.ignore() and cin.clear() for C++? When is it appropriate to use these? How do they affect the next cin>>? - Quora](https://qph.cf2.quoracdn.net/main-thumb-7228535-200-uzexnsghmbfkvzhgsmigsggetupushts.jpeg)
Can you explain cin.ignore() and cin.clear() for C++? When is it appropriate to use these? How do they affect the next cin>>? - Quora
![1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero 1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero](https://www.coursehero.com/thumb/18/e5/18e5e5521461ada4ee77800c67af2c11297474f4_180.jpg)
1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero
![1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero 1.2.cpp - #include<iostream> /The cin.clear() clears the error flag on cin (so that future I/O operations will work correctly), /and then | Course Hero](https://www.coursehero.com/thumb/73/72/7372a8a6f18254cd8b5eeb2c8f9f72326833927d_180.jpg)