Name

operator >>function template — Reads a bitset

Synopsis

template <typename charT, typename traits, size_t N>
  basic_istream<charT, traits)& operator>>(basic_istream<charT, traits)& 
                                           in, const bitset<N>& x);

The >> operator reads a bitset from an input stream. It extracts up to N characters and constructs a bitset object using the same format as the string constructor.

Only '0' and '1' characters are extracted. Input stops when it reaches any other character (without extracting that other character).