Thursday, December 2, 2010

vector<bool>

vector<bool> does not behave like other vectors such as vector<int>.

vector<bool> is template specialization of the vector template class. It was was done to optimize space by using 1 bit per element. It does not contain values with the bool type.

Reference: http://en.wikipedia.org/wiki/Boolean_datatype

No comments:

Post a Comment