O'Reilly logo

Sams Teach Yourself C++ in One Hour a Day, Eighth Edition by Siddhartha Rao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 25. Working with Bit Flags Using STL

Bits can be an efficient way of storing settings and flags. The Standard Template Library (STL) supplies classes that help organize and manipulate bitwise information. This lesson introduces you to

Image The bitset class

Image The vector<bool>

The bitset Class

std::bitset is the STL class designed for handling information in bits and bit flags. std::bitset is not an STL container class because it cannot resize itself. This is a utility class that is optimized for working with a sequence of bits whose length is known ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required