您好,欢迎访问三七文档
当前位置:首页 > 高等教育 > 工学 > 清华大学土木工程CAD技术基础课件08建筑结构CAD系统设计
CAD8-18-28-38-48-570“”8-18-2131……2CAD3236123456GB/T8567-1988GB/T9385-19881411.11.21.31.422.12.22.333.13.23.33.43.53.644.14.24.34.4,,3.13.23.33.44.14.21)ID2)3)4)4.31)2)3)4)4.44.51)2)8-31CC++e.g.e.g.1.2.3.4.5.6.e.g.21nn0T(t1,t2,t3,…,tn)t1t2t3t4t5tnt6t7…Loc(ti)=Loc(t1)+(i-1)LL,staticcharLt[m]={‘A’,’B’,’C’,’D’,’E’…};charc1;c1=Lt[i-1];Lt[j–1]=Lt[j](j=i+1,i+2,…,n–;i,len=sizeof(Lt)/sizeof(Lt[0]);printf(“\n:”);c=getch();printf(“\n:”);scanf(“%d”,&i);if(i1){for(j=len;j=1;j––)Lt[j]=Lt[j–1];Lt[0]=c;}elseif(ilen)Lt(len)=c;else{for(j=len;j=1;j––)Lt[j]=Lt[j–1];Lt[i–1]=c;}t1t2t3t4t5tnt6t7…e.g.2S=(a0,a1,……,an-1)“”a0a1an-2an-1……topbottomtoptoptopa0a1an-2an-1……topbottom……a0a1an-2an-1……topbottomstack::stack(ints){elements=newint[maxSize];assert(elements!=0);//}voidstack::push(constint&item){assert(!isFull());elements[++top]=item;}intstack::pop(){assert(!isEmpty());returnelements[top--];}intstack::getTop(){assert(!isEmpty());returnelements[top];}classstack{public:stack(int=10);~stack(){delete[]elements;}voidpush(constint&item);intpop();intgetTop();voidmakeEmpty(){top=-1;}intisEmpty()const{returntop==-1;}intisFull()const{returntop==maxSize-1}private:inttop;int*elements;intmaxSize}undoundoe.g.3S=(a0,a1,……,an-1)“”a0a1an-2an-1……rearfrontfront(rear)frontrearrear0frontrearreara0a1an-2an-1……rearfront……a0a1an-2an-1……rearfront4ABCDlistABCDlist……ABCDlistintinsert(intd=0);intappend(intd=0);voidgetData(List&il,i);voidreverse();private:Item*end();Item*list;};intList::print(){if(list==0){cout“empty\n”;return0;}cout“(“;intcnt=0;Item*pt=list;while(pt){classlist;classItem{public:friendclassList;private:Item(intd=0){data=d;next=0;}intdata;Item*next;};classList{public:List(){list=0;}List(intd){list=newItem(d);}intprint();if(++cnt%40==1&&cnt!=1)coutendl;coutpt-data“”;pt=pt-next;}cout“)\n”;returncnt;}intList::insert(intd){Item*pt=newItem(d);pt-next=list;list=pt;returnd;}intList::append(intd){Item*pt=newItem(d);if(list==0)list=pt;else(end())-next=pt;returnd;}Item*List::end(){Item*prv,*pt;for(prv=pt=list;pt;prv=pt,pt=pt-next);returnprv;}intList::getData(List&il,i){Item*pt=il.list;while(intj++!=i)pt=pt-next;returnpt-data;}voidList::reverse(){Item*pt,*prv,*tmp;prv=0;pt=list;list=end();while(pt!=list){tmp=pt-next;pt-next=prv;prv=pt;pt=tmp;}list-next=prv;}voidList::length(){intcnt=0;Item*pt=list;for(;pt;pt=pt-next,cnt++);returncnt;}ABCDliste.g.5ABCDfirst6ABCDlist7ABCDEFGHIJKLM……ABCDEFGHIJKLM701234568910111213147012345689780213012345601203210000600000010000000100000010110000100110010000000012345601234560123456……0123456311.11.21.31.422.12.22.32.42.52.62.733.13.23.344.14.24.355.15.25.368-4“”……8-5CADCADCADCAD
本文标题:清华大学土木工程CAD技术基础课件08建筑结构CAD系统设计
链接地址:https://www.777doc.com/doc-10667244 .html