Open MikeLupanov opened 3 years ago
Thank you for pointing this error. It has been reported by other readers and should have been added to the errata, although I don't know exactly where that is located.
The postfix operator++ is wrong in the book. It's correct implementation is this:
ipv4 operator++(int)
{
ipv4 result(*this);
++(*this);
return result;
}
the postfix operator++ does not work correctly, because it returns **this* instead result**: