vector<bool> is a specialization of vector<T> that provides for compact representation of boolean vectors
vector<bool> complements the fixed-typed container bitset<N>
#include <iostream> #include <vector> int main(){ using namespace std; vector<bool> vb; vb.push_back(true); vb.push_back(true); vb.push_back(false); vb.push_back(false); vb.push_back(false); vb.push_back(true); typedef vector<bool>::const_iterator VBI; for(VBI it = vb.begin(); it != vb.end(); it++) cout << *it; // 110001 }