[#BloombergLP-bdlc-BitArray-2constructor-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::BitArray
:relfileprefix: ../../../
:mrdocs:

Create a bit array of the specified initial length&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;bitarray&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
BitArray(
    std::size&lowbar;t initialLength,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

== Description

Create an array of binary digits having the specified `initialLength` and using the optionally specified `basicAllocator` to supply memory&period; Each bit is initialized to `false` (0)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *initialLength*
| initial number of bits in the array
| *basicAllocator*
| memory allocator&semi; null uses the default
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
