#include<iostream> #include<string> using namespace std; void toNum(string ip) { long num[4] = {0, 0, 0, 0}; int point = 0; //记录点出现的次数 for (int i = 0; i < ip.length(); i++) { //遍历ip字符串 if (ip[i] != '.') { //通过.分割 num[point] = num[point] * 10 + ip[i] - '0'; } else { point++; //点数增加 } }...