Advertisement

华为题库:分析两台设备的网络地址归属

阅读量:

本题需验证所输入的子网掩码与IP地址是否符合规范要求。

复制代码
 #include <stdarg.h>

    
 #include <stdio.h>
    
 #include <iostream>
    
 #include <vector>
    
 #include <string.h>
    
 #include <algorithm>
    
 #include <stdlib.h>
    
 #include <memory>
    
 #include <string.h>
    
 #include <set>
    
 #include <map>
    
 #include <sstream>
    
 #include <string>
    
  
    
 using namespace std;
    
  
    
 int checkNetSegment(string mask, string ip1, string ip2) 
    
 {     
    
 	if(mask.size() == 0||ip1.size() == 0||ip2.size() == 0)
    
 	{
    
 		return 1;
    
 	}
    
     /*在这里实现功能*/
    
 	int

全部评论 (0)

还没有任何评论哟~