九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版

上傳人:仙*** 文檔編號:35035844 上傳時間:2021-10-25 格式:DOC 頁數(shù):78 大?。?46KB
收藏 版權申訴 舉報 下載
嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版_第1頁
第1頁 / 共78頁
嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版_第2頁
第2頁 / 共78頁
嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版_第3頁
第3頁 / 共78頁

下載文檔到電腦,查找使用更方便

10 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版》由會員分享,可在線閱讀,更多相關《嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼Word版(78頁珍藏版)》請在裝配圖網(wǎng)上搜索。

1、傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!嚴蔚敏版數(shù)據(jù)結(jié)構(gòu)所有算法代碼-線性數(shù)據(jù)結(jié)構(gòu)- 2013年9月/線性表、鏈表/棧、隊列/數(shù)組、廣義表/串-線性表-typedef structchar name20;/注意如果應用指針的形式 /在初始化每個結(jié)點時一定要先為結(jié)點中的每個變量開辟內(nèi)存空間char sex;char addr100;unsigned int age;char phonenum20;node;/結(jié)點描述typedef structnode *p;int length;/當前順序表長度int listsize;/當前分配的線性表長度list;/線性表描述list L;/

2、定義一個線性表int initlist(list &l)/構(gòu)造一個空的線性表l.p=(node*)malloc(LIST_INIT_SIZE*sizeof(node);if(!(l.p)exit(1);l.length=0;l.listsize=LIST_INIT_SIZE;return true;void destroylist(list &l)/銷毀線性表操作if(l.p!=NULL)free(l.p);printf(銷毀成功!n);else傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!printf(線性表不存在!n);int clearlist(list &l)/將線性表置空操作

3、if(l.p=NULL)printf(線性表不存在!n);return false;elsefree(l.p);l.p=(node*)malloc(l.listsize*sizeof(node);l.length=0; return true;int listempty(list &l)/判斷線性表是否為空表if(l.p=NULL)return true;elsereturn false;int getelem(list &l,int i,node &e)/用e返回表中第i個數(shù)據(jù)元素if(l.p=NULL)return false;elsee=l.pi-1; return true;int p

4、riorelem(list &l,int i,node &pre_e)/得到第i個元素的前驅(qū)元素if(i=0|l.p=NULL)return false;elsepre_e=l.pi-1;return true;int nextelem(list &l,int i,node &next_e)/得到表中第i個元素的后繼元素if(i=l.length|l.p=NULL)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!return false;elsenext_e=l.pi+1;return true;int insertlist(list &l,int i,node &e)/將元素e插入到表

5、l中第i個元素的后面node *q,*k;if(il.length+1)return false;if(l.length=l.listsize)l.p=(node *)realloc(l.p,(l.listsize+LISTINCREMENT)*sizeof(node);if(!l.p)exit(1);l.listsize+=LISTINCREMENT;k=&l.pi-1;for(q=&l.pl.length-1;qk;q-)*(q+1)=*q;*k=e;l.length+;return true;int deletelist(list &l,int i,node &e)/刪除表中第i個元素并

6、用e返回其值node *q;int j=i-1;if(il.length)return false;e=l.pi-1;for(q=&l.pi-1;jl.length-1;j+)*q=*(+q);l.length-;return true;void mergerlist(list la,list lb,list &lc)/歸并兩個按非遞減排列的線性表int la_len,lb_len,i=1,j=1,k=0;node ai,bj;傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!la_len=la.length;lb_len=lb.length;while(i=la_len&j=lb_len

7、)getelem(la,i,ai);getelem(lb,j,bj);if(ai.a=bj.a)insertlist(lc,+k,ai);i+;elseinsertlist(lc,+k,bj);j+;while(i=la_len)getelem(la,i,ai);insertlist(lc,+k,ai);i+;while(j=lb_len)getelem(lb,j,bj);insertlist(lc,+k,bj);j+;int ListAscendingOrder(list &l)/按結(jié)點中某一元素的比較升序排列線性表中的結(jié)點node e;int i,j;if(l.p=NULL|l.lengt

8、h=1)return ERROR;for(i=0;il.length-1;i+)for(j=i+1;j=l.pj.num)e=l.pi;l.pi=l.pj;l.pj=e;傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!return OK;/省略降序排列void MergerList(list la,list lb,list &lc)/將兩線性表升序排列后再歸并node *q,*k,e1;int i=0,j=0,m=0,n;ListAscendingOrder(la);ListAscendingOrder(lb);printf(表a升序排列后為:n);for(i=0;ila.length;

9、i+)printf(%d ,la.pi.num);printf(n);printf(表b升序排列后為:n);for(i=0;ilb.length;i+)printf(%d ,lb.pi.num);printf(n);i=0;while(ila.length&jlb.length)if(la.pi.num=lb.pj.num)e1=la.pi;i+;elsee1=lb.pj;j+;if(e1.num!=lc.plc.length-1.num)InsertList(lc,+m,e1);if(ila.length)while(ila.length)if(la.pi.num!=lc.plc.lengt

10、h-1.num)InsertList(lc,+m,la.pi);i+;if(jlb.length)while(jlb.length)if(lb.pj.num!=lc.plc.length-1.num)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!InsertList(lc,+m,lb.pj);j+;printf(按升序排列再歸并兩表為:n);for(n=0;nnext=NULL;return OK;void InvertedList(slist &head1,slist &head2)/構(gòu)造新表逆置單鏈表函數(shù)list *p,*q;p=head1-next;q=p-next;if(p=N

11、ULL)printf(鏈表為空無法實現(xiàn)逆置操作n);elsewhile(q!=NULL)p-next=head2-next; head2-next=p;p=q;q=q-next;p-next=head2-next;head2-next=p;傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!printf(逆置成功!?n);void InsertList(slist &head,node &e)/此處應為指針的引用/而不應該是list *headlist *p,*q;p=(list *)malloc(sizeof(list);q=head;while(q-next!=NULL)q=q-next

12、;p-next=q-next;q-next=p;p-data=e;void InvertedList(sqlist &head)/-不構(gòu)造新表逆置單鏈表函數(shù)-/list *p,*q,*k;p=head-next;q=p-next;k=q-next;p-next=NULL;while(k!=NULL)q-next=p;p=q;q=k;k=k-next;q-next=p;head-next=q;/-交換鏈表中第i個和第j個結(jié)點,函數(shù)實現(xiàn)如下/int SwapListNode(sqlist &head,int i,int j)int m,n,m1,n1,sum=0;list *p,*q,*k,*c,

13、*d,*ba;ba=head-next;while(ba!=NULL)sum+;ba=ba-next;if(i=j|isum|jsum|i1|j1)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!printf(所要交換的兩個結(jié)點有誤!n);return ERROR;if(ij) m=i; n=j;else m=j;n=i;p=head;q=head;for(m1=1;m1next;for(n1=1;n1next;if(p-next=q)/如果結(jié)點相鄰k=head;while(k-next!=p)k=k-next;/相鄰兩結(jié)點的交換p-next=q-next;q-next=p;k-next

14、=q;else/如果結(jié)點不相鄰k=head;c=head;while(k-next!=p)k=k-next;while(c-next!=q)c=c-next;d=p-next;/不相鄰兩結(jié)點之間的交換p-next=q-next;c-next=p;k-next=q;q-next=d;return OK;/-將鏈表中結(jié)點按結(jié)點中某一項大小升序排列,函數(shù)實現(xiàn)如下-/int AscendingList(sqlist &head)int m,n,sum=0,i,j;list *p,*q,*k;k=head-next;傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!while(k!=NULL)sum

15、+;k=k-next;for(i=1;isum;i+)for(j=i+1;jnext;m=1;while(m!=i)m+;p=p-next;q=head-next;n=1;while(n!=j)n+;q=q-next;if(p-data.expq-data.exp)/如果按exp降序排列,則應將改為next;q=head2-next;while(p!=NULL&q!=NULL)if(p-data.expdata.exp)InsertList(head3,p-data);p=p-next;elseif(p-data.expq-data.exp)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除

16、!InsertList(head3,q-data);q=q-next;elseif(p-data.exp=q-data.exp)e.coefficient=p-data.coefficient+q-data.coefficient;e.exp=p-data.exp;/e.exp=q-data.exp;InsertList(head3,e);p=p-next;q=q-next;if(p!=NULL)while(p!=NULL)InsertList(head3,p-data);p=p-next;/如果p中有剩余,則直接將p中剩余元素插入head3中if(q!=NULL)while(q!=NULL)

17、InsertList(head3,q-data);q=q-next;/如果q中有剩余,則直接將q中的剩余元素插入head3中return 0;-棧-/-利用棧結(jié)構(gòu)實現(xiàn)數(shù)制之間的轉(zhuǎn)換-書3.2.1/typedef structint num;node;typedef struct node *base;node *top;int stacksize;stack;/順序棧結(jié)構(gòu)定義int CreatStack(stack &stackll)stackll.base=(node *)malloc(INITSTACKSIZE*sizeof(node);if(!stackll.base)傳播優(yōu)秀Word版

18、文檔 ,希望對您有幫助,可雙擊去除!exit(OVERFLOW);stackll.top=stackll.base;stackll.stacksize=INITSTACKSIZE;return OK;void push(stack &s,node e)/進棧操作if(s.top-s.base=s.stacksize)s.base=(node *)realloc(s.base,(s.stacksize+INCRESTACKMENT)*sizeof(node);if(!s.base)exit(OVERFLOW);s.top=s.base+s.stacksize;/可以不寫此語句;s.stacksi

19、ze+=INCRESTACKMENT;*(s.top+)=e;/*s.top+=e;void pop(stack &s,node &e)/出棧操作if(s.top=s.base|s.base=NULL)printf(信息有誤!n);elsee=*-s.top;/-取棧頂元素函數(shù)-/void gettop(stack &s,node &e)if(s.base=s.top)printf(棧為空,無法取得棧頂元素!n);elsee=*(s.top-1);/-棧的應用:括號匹配的檢驗-書3.2.2/省略了大部分上述已有代碼/int zypd(char c)/判斷是否為左括號字符if(c=|c=|c=(

20、)return OK;elsereturn ERROR;int main(void)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!stack s;node e1,e2,e3;char stINITSTACKSIZE;int i=0,j;CreatStack(s);printf(請輸入括號字符,以#做結(jié)束符:);scanf(%c,&sti);while(sti!=#)i+;scanf(%c,&sti);if(!zypd(st0)printf(輸入字符不合法!n);elsefor(j=0;jnext=NULL;s.top=s.base;void InsertStack(stack &s,n

21、ode e)node *p;p=(node *)malloc(sizeof(node);if(!p)exit(1);else*p=e;p-next=s.top;s.top=p;void DeleteStack(stack &s,node &e)node *p;if(s.top=s.base)printf(棧為空!n);傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!elsep=s.top;s.top=s.top-next;e=*p;free(p);-隊列-/-鏈隊列的描述及操作-/typedef struct Nodeint a;struct Node *next;Qnode,*Queu

22、ePtr;typedef struct QueuePtr front;QueuePtr rear;LinkQueue;void InitQueue(LinkQueue &Q)Q.front=(Qnode *)malloc(sizeof(Qnode);if(!Q.front)exit(1);Q.rear=Q.front;Q.front-next=NULL;void InsertQueue(LinkQueue &Q,Qnode e)QueuePtr p;p=(Qnode *)malloc(sizeof(Qnode);if(!p)exit(1);*p=e;p-next=NULL;Q.rear-nex

23、t=p;Q.rear=p;void DeleteQueue(LinkQueue &Q,Qnode &e)Qnode *p;if(Q.front=Q.rear)printf(隊列為空!n);傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!elsep=Q.front-next;e=*p;Q.front-next=p-next;if(p=Q.rear)Q.rear=Q.front;free(p);/-循環(huán)隊列-/typedef struct nodeint data;struct node *next;node;typedef struct queuenode *base;int front;

24、int rear;Queue;int tag;void InitQueue(Queue &Q)Q.base=(node *)malloc(MAX*sizeof(node);if(!Q.base)exit(1);Q.front=Q.rear=0;tag=0;void InsertQueue(Queue &Q,node e)if(tag=1&Q.front=Q.rear)printf(循環(huán)隊列已滿!n);elseQ.baseQ.rear=e;Q.rear=(Q.rear+1)%MAX;if(Q.rear=Q.front)tag=1;void DeleteQueue(Queue &Q,node &e

25、)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!if(tag=0&Q.front=Q.rear)printf(隊列為空!n);elsee=Q.baseQ.front;Q.front=(Q.front+1)%MAX;if(Q.front=Q.rear)tag=0;int EmptyQueue(Queue &Q)if(Q.front=Q.rear&tag=0)return 1;elsereturn 0;-串-/-串:堆分配存儲形式的一些操作-/typedef struct stringchar *ch;int length;sstring;void CreatString(sstring

26、&T)T.ch=(char*)malloc(sizeof(char);T.length=0;void StringAssign(sstring &T,char *s)/將串s的值賦值給串Tif(T.ch)free(T.ch);T.ch=(char*)malloc(strlen(s)*sizeof(char);/或者T.ch=(char*)malloc(sizeof(char);/動態(tài)開辟空間不同于靜態(tài)內(nèi)存開辟之處if(!T.ch)printf(ERROR);exit(1);strcpy(T.ch,s);傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!T.length=strlen(s);

27、void ClearString(sstring &T)if(T.ch)free(T.ch);T.length=0;void ConcatString(sstring &T,sstring s1,sstring s2)/串連接if(T.ch)free(T.ch);T.ch=(char*)malloc(strlen(s1.ch)+strlen(s2.ch)*sizeof(char);if(!T.ch)printf(ERRORn);exit(1);strcpy(T.ch,s1.ch);strcat(T.ch,s2.ch);T.length=strlen(s1.ch)+strlen(s2.ch);v

28、oid SubString(sstring &sub,sstring s,int pos,int len)/取子串操作,取串s中位置從pos至len處的子串于sub中int i,j=0;if(sub.ch)free(sub.ch);sub.ch=(char *)malloc(len-pos+1+1)*sizeof(char);if(!sub.ch)printf(ERRORn);exit(1);for(i=pos-1;is1.length)printf(ERRORn);傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!return 0;elsefor(i=0;is1.length;i+)k=

29、1;for(j=0;js2.length;j+)if(s2.chj!=s1.chi+j)k=0;break;if(k)count+;return count;void Deletestring(sstring &s,int pos,int len)/刪除s串中位置從pos到len處的元素int i,j,k;if(s.length=0)printf(ERRORn);elsefor(i=pos-1,j=len;js.length;i+,j+)s.chi=s.chj;s.chi=0;s.length-=(len-pos)+1;void DeleteSub(sstring &s1,sstring s2

30、)/刪除母串s1中的子串s2int i,j,k,tag=0;for(i=0;is1.length;i+)k=1;if(tag)i-;for(j=0;js2.length;j+)if(s2.chj!=s1.chi+j)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!k=0;break;if(k)Deletestring(s1,i+1,i+s2.length);tag=1;-KMP算法-int index_kmp(string T,string S,int pos)int i=pos,j=1;while(i=S.length&jT.length)return i-T.length;elser

31、eturn 0;void get_next(string T)int i=1,j=0;next1=0;while(i=T.length)if(j-1=0|T.chi=T.chj)i+;j+;if(T.chi!=T.chj)nexti=j;else傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!nexti=nextj;elsej=nextj;-數(shù)組-矩陣轉(zhuǎn)置的經(jīng)典算法-for(i=0;irow;i+)for(j=0;jcol;j+)bji=aij;時間復雜度為O(row*col),每個元素都要存儲,相對于稀疏矩陣來說比較浪費存儲空間。-矩陣轉(zhuǎn)置-利用三元組實現(xiàn)-#define MAX 12

32、500/假設一個稀疏矩陣最多有12500個非零元typedef structint i,j;/i,j用于存儲矩陣中元素的行、列下標int num;/num為矩陣中非零元的值Triple;/定義一個三元組typedef struct Triple dataMAX+1;int mu,nu,tu;/mu,nu非別表示一個稀疏矩陣的行數(shù)和列數(shù)/tu表示該稀疏矩陣的非零元個數(shù)TSMatrix;/矩陣轉(zhuǎn)置,核心算法如下:t.mu=m.nu;t.nu=m.mu;t.tu=m.tu;for(i=0;im.nu;i+)for(j=0;jm.tu;j+)/按列遍歷三元組if(m.dataj.j=i)/按列升序存入

33、數(shù)組t.datap.i=m.dataj.j;t.datap.j=m.dataj.i;t.datap.num=m.dataj.num;p+;該算法時間復雜度為O(nu*tu),即與該矩陣的列數(shù)和非零元個數(shù)有關,當tu=mu*nu時,時間復雜度為O(nu2*tu),此時的時間復雜度比一般算法的時間復雜度還要大,因此此算法適用于tumu*nu的情況,此算法相比一般算法節(jié)省了存儲空間。傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!-快速轉(zhuǎn)置算法-t.tu=m.tu;t.mu=m.nu;t.nu=m.mu;for(i=1;i=m.nu;i+)numi=0;/先使每列上元素的個數(shù)為0for(i=0

34、;im.tu;i+)numm.datai.j+;/遍歷三元組求得每列上元素的個數(shù)for(i=2;i=m.nu;i+)cpoti=cpoti-1+numi-1;/求得每列上第一個元素在轉(zhuǎn)置矩陣三元組中的存儲序號for(i=0;im.tu;i+)j=m.datai.j;q=cpotj;t.dataq.i=m.datai.j;t.dataq.j=m.datai.i;t.dataq.num=m.datai.num;cpotj+;/當該列上一個元素存儲完時序號加1該算法時間復雜度O(nu+tu),這種算法稱為快速轉(zhuǎn)置算法。-利用行邏輯連接順序表實現(xiàn)矩陣相乘-typedef struct int i,j;

35、int num;Triple;typedef struct Triple dataMAXSIZE;int rposMAXRC;/存放每行中首個非零元的位置int mu,nu,tu;RLSMatrix;/行邏輯連接順序表的定義int MultMatrix(RLSMatrix m,RLSMatrix n,RLSMatrix &q)/矩陣相乘函數(shù)、核心算法int arow,ctempMAXRC,i,tp,p,brow,t,ql,ccol;if(m.nu!=n.mu)return ERROR;q.mu=m.mu;q.nu=n.nu;q.tu=0;if(m.tu*n.tu!=0)for(arow=1;a

36、row=m.mu;arow+)/按m矩陣中每行進行處理for(i=1;i=n.nu;i+)ctempi=0;/每行處理開始,使得ctemp置零傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!q.rposarow=q.tu+1;/求矩陣q中rpos的值if(arowm.mu)tp=m.rposarow+1;elsetp=m.tu+1;/求得arow下一行第一個非零所在的位置for(p=m.rposarow;ptp;p+)/依次處理矩陣m中每行上所有的非零元brow=m.datap.j;if(brown.mu)t=n.rposbrow+1;elset=n.tu+1;for(ql=n.rpos

37、brow;qlt;ql+)ccol=n.dataql.j;ctempccol+=m.datap.num*n.dataql.num;for(ccol=1;ccolMAXSIZE) return ERROR;q.dataq.tu.i=arow;q.dataq.tu.j=ccol;q.dataq.tu.num=ctempccol;return OK;void getrpos(RLSMatrix &m)int i,numMAXRC,j;for(i=1;i=m.mu;i+)numi=0;/先使每行上元素的個數(shù)為0for(i=1;i=m.tu;i+)numm.datai.i+;/遍歷三元組求得每行上元素的

38、個數(shù)for(j=1;j=m.mu;j+)if(numj!=0)傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!break;m.rposj=1;/j代表第一個非零元數(shù)不為零的行的下標for(i=j+1;ii=t-i;p-j=t-j;p-e=t-e;rpre=&q.rheadp-i;cpre=&q.cheadp-j;for(i=1;iright=NULL|rpre-right-jp-j) break;if(rpre-right-j=p-j) tag=0;break;rpre=rpre-right;/找到指針rpre的位置while(1)if(cpre-dowm=NULL|cpre-dowm-

39、ii) break;cpre=cpre-dowm;/找到cpre的位置if(tag)/判斷該要出入的結(jié)點所在的行是否已經(jīng)存在元素p-right=rpre-right;rpre-right=p;p-dowm=cpre-dowm;cpre-dowm=p;傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!elseif(rpre-right-e+p-e=0)if(rpre-right!=NULL)rpre-right=rpre-right-right;if(cpre-dowm!=NULL)cpre-dowm=cpre-dowm-dowm;if(rpre-right-e+p-e!=0)rpre-ri

40、ght-e+=p-e;/用十字鏈表存儲矩陣void CreatMatrix(ListMatrix &m)int m1,n,t,i;OLNode *p,*rpre,*cpre;printf(請輸入矩陣的行數(shù)、列數(shù)、非零元個數(shù):);scanf(%d%d%d,&m1,&n,&t);m.mu=m1;m.nu=n;m.tu=t;m.rhead=(OLNode *)malloc(m1+1)*sizeof(OLNode);m.chead=(OLNode *)malloc(n+1)*sizeof(OLNode);for(i=1;im1+1;i+)m.rheadi.right=NULL;for(i=1;in+1

41、;i+)/初始化指針的值m.cheadi.dowm=NULL;printf(請輸入這%d個非零元:n,m.tu);for(i=0;ii,&p-j,&p-e);InsertMatrix(p,m);-廣義表-2013/09/01-廣義表的構(gòu)造及遞歸遍歷-/廣義表的定義用到串的一些操作,上述已有串的定義在此不再敘述。typedef enumATOM,LISTElemTag;typedef struct GLNodeElemTag tag;union傳播優(yōu)秀Word版文檔 ,希望對您有幫助,可雙擊去除!char atom;structstruct GLNode *hp,*tp;ptr;/若atom占用

42、內(nèi)存則表明為原子結(jié)點,否則ptr占用內(nèi)存為表結(jié)點*Glist;/廣義表結(jié)點結(jié)構(gòu)的定義void SubString(Sstring &A,Sstring &B,int i,int n)/取子串操作/將B串中從第i個字符起長度為n的字符串復制到A中int j=0,m=0;for(j=i;ji+n;j+)A.chm+=B.chj;A.chm=0;A.length=m;void SeverGlist(Sstring &str,Sstring &hstr)/將非空串(廣義表形式的串)str中第一個逗號之前的/字符置給hstr,剩余的字符(除去該逗號)留在str中Sstring Ch;int i=0,k=0,n=str.length;InitString(Ch);doi+;ClearString(Ch);InitString(Ch);SubString(Ch,str,i-1,1);

展開閱讀全文
溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

相關資源

更多
正為您匹配相似的精品文檔
關于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!