class for Ip and Mac

This commit is contained in:
Erik Frojdh
2019-04-02 15:24:25 +02:00
parent df2d67d90d
commit b198b50377
10 changed files with 204 additions and 138 deletions

View File

@ -27,13 +27,7 @@ int main() {
IpAddr a("129.129.205.242");
IpAddr b(4073554305);
std::cout << "a is: " << a << " and b is: " << b << "\n";
if (a == b)
std::cout << "a is equal to b\n";
std::cout << "as hex they look like: " << a.hex() << "\n";
std::cout << "and the best thing is that the size is only: " << sizeof(a) << " bytes\n";
std::vector<IpAddr> vec;
vec.push_back(a);
return 0;
}