Problems
Here are the problem-solving sections for this chapter.
15. IPv4 data type
Write a class that represents an IPv4 address. Implement the functions required to be able to read and write such addresses from or to the console. The user should be able to input values in dotted form, such as 127.0.0.1
or 168.192.0.100
. This is also the form in which IPv4 addresses should be formatted to an output stream.
16. Enumerating IPv4 addresses in a range
Write a program that allows the user to input two IPv4 addresses representing a range and list all the addresses in that range. Extend the structure defined for the previous problem to implement the requested functionality.
17. Creating a 2D array with basic operations
Write a class template that represents a two-dimensional array container with methods for element access (at()
and data()
), capacity querying, iterators, filling, and swapping. It should be possible to move objects of this type.
18. Minimum function with any number of arguments
Write a...