[#prevector-0c-assign-0a]
= xref:prevector-0c.adoc[prevector]::assign
:relfileprefix: ../
:mrdocs:

Replaces the contents with `n` copies of `val`&period;

== Synopsis

Declared in `&lt;prevector&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
assign(
    xref:prevector-0c/size_type.adoc[size&lowbar;type] n,
    T const& val);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *n*
| The number of copies to store&period;
| *val*
| The value to copy into each element&period;
|===


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