Standard C++ Library Reference ISO/IEC (VERSION3)
basic_istream& operator>>(unsigned short& val);
basic_istream& operator>>(int& val);
basic_istream& operator>>(unsigned int& val);
basic_istream& operator>>(long& val);
basic_istream& operator>>(unsigned long& val);
basic_istream& operator>>(void *& val);
each extract a field and convert it to a numeric value by calling use_facet<num_get<Elem,
InIt>(getloc()). get(InIt( rdbuf()), Init(0), *this, getloc(),
val). Here, InIt is defined as istreambuf_iterator<Elem, Tr>, and val has type
long, unsigned long, or void * as needed.
If the converted value cannot be represented as the type of val, the function calls
setstate(failbit). In any case, the function returns *this.
The functions:
basic_istream& operator>>(float& val);
basic_istream& operator>>(double& val);
basic_istream& operator>>(long double& val);
each extract a field and convert it to a numeric value by calling use_facet<num_get<Elem,
InIt>(getloc()). get(InIt( rdbuf()), Init(0), *this, getloc(),
val). Here, InIt is defined as istreambuf_iterator<Elem, Tr>, and val has type
double or long double as needed.
If the converted value cannot be represented as the type of val, the function calls
setstate(failbit). In any case, it returns *this.
basic_istream::peek
int_type peek();
The unformatted input function extracts an element, if possible, as if by returning
rdbuf()->sgetc(). Otherwise, it returns traits_type::eof().
basic_istream::putback
basic_istream& putback(char_type ch);
The unformatted input function puts back ch, if possible, as if by calling
rdbuf()->sputbackc(). If rdbuf() is a null pointer, or if the call to sputbackc returns
traits_type::eof(), the function calls setstate(badbit). In any case, it returns
*this.