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).

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.