Standard C++ Library Reference ISO/IEC (VERSION3)
operator>>
template<class Elem, class Tr>
basic_istream<Elem, Tr>&
operator>>(basic_istream<Elem, Tr>& istr, Elem *str);
template<class Elem, class Tr>
basic_istream<Elem, Tr>&
operator>>(basic_istream<Elem, Tr>& istr, Elem& ch);
template<class Tr>
basic_istream<char, Tr>&
operator>>(basic_istream<char, Tr>& istr,
signed char *str);
template<class Tr>
basic_istream<char, Tr>&
operator>>(basic_istream<char, Tr>& istr,
signed char& ch);
template<class Tr>
basic_istream<char, Tr>&
operator>>(basic_istream<char, Tr>& istr,
unsigned char *str);
template<class Tr>
basic_istream<char, Tr>&
operator>>(basic_istream<char, Tr>& istr,
unsigned char& ch);
The template function:
template<class Elem, class Tr>
basic_istream<Elem, Tr>&
operator>>(basic_istream<Elem, Tr>& istr, Elem *str);
extracts up to N - 1 elements and stores them in the array beginning at str. If
istr.width() is greater than zero, N is istr.width(); otherwise it is the size of the largest
array of Elem that can be declared. The function always stores Elem() after any extracted
elements it stores. Extraction stops early on end-of-file, on a character with value Elem(0)
(which is not extracted), or on any element (which is not extracted) that would be discarded by
ws. If the function extracts no elements, it calls istr.setstate(failbit). In any case, it
calls istr.width(0) and returns istr.
The template function:
template<class Elem, class Tr>
basic_istream<Elem, Tr>&
operator>>(basic_istream<Elem, Tr>& istr, char& ch);
extracts an element, if possible, and stores it in ch. Otherwise, it calls
is.setstate(failbit). In any case, it returns istr.