freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

網(wǎng)絡(luò)課程設(shè)計報告ip地址的合法性及子網(wǎng)判斷(參考版)

2024-08-01 12:10本頁面
  

【正文】 } return temp。 strcat(temp,two)。 strcat(temp,four)。 strcat(temp,six)。 //第一次循環(huán)的第一次傳遞用連接函數(shù) flag=true。 if(flag==true) { strcat(temp,eight)。 itoa(a[i]/10%10,two,10)。 itoa(a[i]/1000%10,four,10)。 itoa(a[i]/100000%10,six,10)。i++) {//char *itoa(int value,char *string,int radix)將整數(shù)value轉(zhuǎn)換成字符串存入string,radix為轉(zhuǎn)換時所用基數(shù) itoa(a[i]/10000000,eight,10)。 for(i=0。 bool flag=false。 //遞歸調(diào)用} 中國計量學(xué)院現(xiàn)代科技學(xué)院課程設(shè)計報告 //把二進(jìn)制int型數(shù)據(jù)轉(zhuǎn)換為一個整體的二進(jìn)制字符型數(shù)據(jù)char * ipTest::toString(int *a){//將二進(jìn)制的數(shù)值數(shù)組轉(zhuǎn)換個字符長的字符指針 char *temp=new char[33]。 }//十進(jìn)制int型數(shù)據(jù)轉(zhuǎn)換為二進(jìn)制int型數(shù)據(jù)int ipTest:: toBinary(int a){//將十進(jìn)制數(shù)轉(zhuǎn)換為二進(jìn)制數(shù) if(a/2==0) return a%2。 } } coutendlIP地址:ip屬于subnet這一子網(wǎng)endl。 //system(pause)。imask。//將二進(jìn)制數(shù)組轉(zhuǎn)換為位的二進(jìn)制字符指針 cbsubnet=toString(nbsubnet)。 char *cbsubnet=new char[33]。//將分離出來的十進(jìn)制轉(zhuǎn)換為二進(jìn)制 nbsubnet[i]=toBinary(nbsubnet[i])。i4。 //用subnet_one而非subnet是為了保護(hù)subnet地址中國計量學(xué)院現(xiàn)代科技學(xué)院課程設(shè)計報告 不被破壞 split(ip_one,nbip)。 //把subnet地址復(fù)制給subnet_one strcpy(ip_one,ip)。 int nbip[4],nbsubnet[4],i。 } return true。 } } return true。 } } if(flag==1) { coutip地址ip的主機(jī)號全,error!endl。iiplen。 } } flag=1。iiplen。 //j1用于判斷全情況,j1用于判斷全情況的起始下標(biāo) int flag=1。 return false。 return false。amp。 coutIp地址屬于c類網(wǎng)endl。amp。 coutIp地址屬于B類網(wǎng)endl。amp。 return false。 //直接從開始 coutIp地址屬于A類網(wǎng)endl。amp。 } int j1=0,j2。 } } if(flag==1) { cout地址ip全為全,error!endl。iiplen。 }中國計量學(xué)院現(xiàn)代科技學(xué)院課程設(shè)計報告 flag=1。 } } if(flag==1) { cout地址ip全為全,error!endl。iiplen。 } } int flag=1。 if(atoi(dot[i])255) //判斷數(shù)值溢出 cout地址ip中含有不在255間的數(shù)字,error!endl。iiplen。 } int i。不是,error!endl。 } } if(t!=3) 中國計量學(xué)院現(xiàn)代科技學(xué)院課程設(shè)計報告 { cout地址ip中的39。.39。j=strlen(ip)。 } int j,t=0。//此時,第一個參數(shù)必須換為NULL } if(iplen!=4) { cout地址ip的段數(shù)不是,error!endl。 iplen++。 //庫函數(shù)strtok(),以ch[]為界限來分段 token=strtok(ip_one,ch)。 char *token,*dot[4]。 char ip_one[18]。 } }中國計量學(xué)院現(xiàn)代科技學(xué)院課程設(shè)計報告 return true。039。039。ilen。 } }//ip,subnet地址中非法字符的判斷bool ipTest::NoIllegalChar(char *ch){ int i,len=strlen(ch)。//atoi()函數(shù)把字符數(shù)值轉(zhuǎn)換為int型數(shù)值 iplen++。 while(token!=NULL) { dot[iplen]=token。 int iplen=0。}//把單個字符地址轉(zhuǎn)換為十進(jìn)制數(shù)值型地址(含四段)void ipTest::split(char *chaddr,int *addr){ char ch[]= .。 return false。amp。amp。 return false。amp。amp。 return false。amp。amp。//用于放十進(jìn)制的各段地址 //調(diào)用把單個字符地址轉(zhuǎn)換為十進(jìn)制數(shù)值型地址(含四段)的函數(shù),實現(xiàn)轉(zhuǎn)換 split(subnet_Temp,nbsubnet)。 ipIsV) { print()。 subnetIsV amp。 maskIsMatSub amp。 }*/
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1