摘要:
#include #include #include int main() { //方式一 int i; char buf[32]="123.45.67.89"; char str[32]="\0"; char *p1,*p2=str; p1=buf; for(i=0; *(p1+i)!='.';i++) { *(p2+i)=*(p1+i); } printf("%... 阅读全文
posted @ 2017-06-20 17:16
quliuliu2013
阅读(467)
评论(0)
推荐(0)
摘要:
//案例一 #include int main() { const char *str="ppp@asdf@asdfasdf@www"; char n1[20],n2[20],n3[20],n4[20]; if(4 == sscanf(str,"%[^@]@%[^@]@%[^@]@%[^@]",n1,n2,n3,n4)) { puts("匹配成功!\n"); } else {... 阅读全文
posted @ 2017-06-20 17:13
quliuliu2013
阅读(236)
评论(0)
推荐(0)

浙公网安备 33010602011771号