摘要:
以下数据来自于Dev CPP首先呈现实际测试数据:主程序如下:1#include<string.h>2#include<iostream>34usingnamespacestd;56typedefstructs1{7//charch,*ptr;8union{9shorta,b;10//unsignedintc:2,d:1;11};12};13//structs1*next;14//};1516intmain()17{18printf("%d\n",sizeof(s1));19system("pause");20return1;21 阅读全文
posted @ 2011-10-06 23:38
Eric.wei
阅读(447)
评论(0)
推荐(1)
摘要:
1//实现voiddelete_char(char*str,charch);2//把str中所有的ch删掉3#include<iostream>4#include<stdio.h>5usingnamespacestd;67voiddelete_char(char*str,charch)8{9intlength=strlen(str);10intindex=0;11char*sb=(char*)malloc(sizeof(char)*(length+1));12if(length>0)13{14memcpy(sb,str,length);15sb[length]=& 阅读全文
posted @ 2011-10-06 21:07
Eric.wei
阅读(331)
评论(0)
推荐(0)

浙公网安备 33010602011771号