串
1 #include<> 2 typedef struct 3 { 4 char *ch; 5 int length; 6 }HString; 7 Status StrAssign(Hstring &T,char *chars) 8 { 9 if(T.ch) free(T.ch); 10 for(i=0,c=chars;c;i++,c++) 11 if(!i) 12 { 13 T.ch=NULL; 14 T.length=0; 15 } 16 else{ 17 if(!(T.ch=(char *)malloc(i*LEN))) 18 exit(FALSE); 19 T.ch[i]=chars[i]; 20 t.length=i; 21 } 22 return OK; 23 } 24 int StrCompare(HString S,HString T) 25 { 26 for(i=0;) 27 }