Page 1 of 1

Using IPAddress object

Posted: Wed Feb 02, 2022 2:32 pm
by claudepio
Hi,

I am trying to copy set an IPAddress object with the IP from another IPAddress object.
I am using the following code which is throwing an error on compile;

IPAddress ip1;
IPAddress ip2(192.168.1.1);

ip1 = ip2;

How can I copy the IP from ip2 into ip1?

Appreciate any help.
Cheers,
Claude

Re: Using IPAddress object

Posted: Sat Apr 02, 2022 7:45 pm
by mbratch
I am using the following code which is throwing an error on compile
Exactly what error are you getting?
The assignment operator= for the class should copy it Ok.