Check out example codes for "how to declare a 2d boolean vector in c++". It will help you in understanding the concepts better.

Code Example 1

vector< vector< bool > > verified( rows, vector<bool>( cols, false ) );

Learn ReactJs, React Native from akashmittal.com