|
|
back to boardReading ip and mask on c++ If you write on c++ you can do this: char dot; unsigned int x,ip; ip = 0; for (int i = 24; i >= 8; i -= 8) { cin >> x >> dot; x <<= i; ip |= x; } cin >> x; ip |= x; ------------------ Now you have ip, same you can read mask. Edited by author 21.01.2019 14:50 Edited by author 21.01.2019 14:52 |
|
|