[#ArgsManager-GetArg-08]
= xref:ArgsManager.adoc[ArgsManager]::GetArg
:relfileprefix: ../
:mrdocs:

Return integer argument or default value

== Synopsis

Declared in `&lt;common&sol;args&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::integral Int&gt;
&lsqb;&lsqb;requires&lowbar;capability(0x7f9524a22988)&rsqb;&rsqb;
Int
GetArg(
    std::string const& strArg,
    Int nDefault) const;
----

== Return Value

command&hyphen;line argument (0 if invalid number) or default value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *strArg*
| Argument to get (e&period;g&period; &quot;&hyphen;foo&quot;)
| *nDefault*
| (e&period;g&period; 1)
|===


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