[#BloombergLP-bdlc-Queue-setLength-0b0]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/Queue.adoc[Queue]::setLength
:relfileprefix: ../../../
:mrdocs:

`setLength` overloads

== Synopses

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

Set the length of this queue to the specified `newLength`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/Queue/setLength-0bc.adoc[setLength](int newLength);
----

[.small]#xref:BloombergLP/bdlc/Queue/setLength-0bc.adoc[_» more&period;&period;&period;_]#

Set the length of this queue, initializing new elements to `initialValue`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/Queue/setLength-04.adoc[setLength](
    int newLength,
    T const& initialValue);
----

[.small]#xref:BloombergLP/bdlc/Queue/setLength-04.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *newLength*
| desired length of this queue
| *initialValue*
| value used to initialize new elements
|===


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