C++ Boolean Array Guide
In C++, boolean arrays can be defined the same way as other arrays. For example:
bool myBoolArray[5]; // 定义一个包含5个bool值的数组
You can also define a bool array using dynamic memory allocation, for example:
int size = 10;
bool* myDynamicBoolArray = new bool[size]; // 动态分配包含10个bool值的数组
When defining a bool array, the elements in the array are initialized as false by default. If you need to initialize them as true, you can explicitly assign a value to each element in the array, or use a loop to initialize the array.