[#CNetAddr-2constructor-08]
= xref:CNetAddr.adoc[CNetAddr]::CNetAddr
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Construct an unspecified, invalid network address&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CNetAddr/2constructor-0c.adoc[CNetAddr]();
----

[.small]#xref:CNetAddr/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Construct a network address from an IPv4 address&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:CNetAddr/2constructor-0b.adoc[CNetAddr](in&lowbar;addr const& ipv4Addr);
----

[.small]#xref:CNetAddr/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Construct a network address from an IPv6 address and optional scope id&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:CNetAddr/2constructor-00.adoc[CNetAddr](
    in6&lowbar;addr const& pipv6Addr,
    uint32&lowbar;t scope = 0);
----

[.small]#xref:CNetAddr/2constructor-00.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ipv4Addr*
| The IPv4 address to store&period;
| *pipv6Addr*
| The IPv6 address to store&period;
| *scope*
| The scope id for scoped&sol;link&hyphen;local IPv6 addresses&period;
|===


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