Look at the return type of the >> operator. It is a reference to istream.
For one, this allows chaining the inputs. The order of evaluation is from left to right.
1 2 3
cin >> idNumber >> name
// is same as
(cin >> idNumber) >> name
If an input fails -- the data could not be converted to type, end of file was reached, etc -- the istream will be in error state and all following inputs fail too.
Whether the >> operations succeed or not, the final evaluation of that line is essentially while ( cin ) {
ios (base class of istream) has a conversion to bool(C++11, or void* C++98), and the above is therefore equivalent to while ( ! cin.fail() ) { http://www.cplusplus.com/reference/ios/ios/operator_bool/