You are probably doing everything correctly.
Here's some C++ dirty laundry: A vector<bool> is not a vector!
Bits in C are usually handled using bitfields. So the vector<bool> uses bitfields, is not a template, has methods not in any real vector, is not an array.
Other than that, it works great (so I hear).
If you insist on bool, then bury the bool in a class and have a vector of that class.