Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <vector>
typedef std::vector<bool> BVec;
...
// Declaration
BVec bv;
// To allocate 500 of bits
bv.resize (500);
// To access bit n
bv[n] = true;
if (bv[n]) ...
Scott Meyers said:An object becomes an STL container only if it fulfills all the container requirements laid down in section 23.1 of the Standard for C++. Among the requirements is that if c is a container of objects of type T and c supports operator[], the following must compile:
Code:T* p = &c[0];