operator>>

template<class E, class T, class A>
    basic_istream<E, T>& operator>>(
        basic_istream <E, T>& is,
        const basic_string<E, T, A>& str);

The template function overloads operator>> to replace the sequence controlled by str with a sequence of elements extracted from the stream is. Extraction stops:

If the function extracts no elements, it calls setstate(ios_base::failbit). In any case, it calls width(0) and returns *this.

See the related sample program.