How to initialise my bool array?

Hello, I have a simple task I'm trying to do.
I want to initialise an array and make every element = false, but I don't want to do a for loop.

bool myArray[myVector.size()] = {false};
1
2
3
4
5
std::vector<bool> myArray( myVector.size() ) ; // every element == false

bool myArray2[1000] = {false}; // every element == false

// bool myArray3[myVector.size()] = {false}; // *** error: myVector.size() is not a constexpr 
I see. So arrays can't be done using vector sizes :(
Thanks anyways.
Registered users can post here. Sign in or register to post.