摘要: 程序特性规定:1 程序开始执行时,自认为一切变元的值为02 转向无定义符号,执行程序的最后一条指令 时 自动认为停机y=x+3y=x+1y=x+1y=x+1y=xn(x)=0x=x+1y=x1+x2y=x1[B] TO A IF x2 !=0 TO E[A] x2 = x2 -1 y=y+1 TO By=2xTO C IF x!=0TO E[C] TO A IF x!=0[B] y=y+1 z=z-1 TO B IF z!=0 TO E[A]x=x-1 y=y+1 z=z+1 TO Cy=x1*x2[B]TO A IF x2 != 0 TO E[... 阅读全文
posted @ 2012-09-18 23:24 xingoo 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 将新的节点插入双向链表的时候:iterator insert(iterator itr,const Object & x)//向双向链表中插入一个x节点{ Node *p = itr.current; theSize++; return iterator(p->prev = p->prev->next = new Node(x,p->prev,p));}LIST类的删除节点的过程://删除双向链表中的一个节点iterator erase(iterator itr){ Node *p = itr.current; iterator retVal(p->nex 阅读全文
posted @ 2012-09-18 20:19 xingoo 阅读(609) 评论(0) 推荐(0) 编辑
摘要: LIST类结构 1 template <typename Object> 2 class List 3 { 4 private: 5 struct Node//所有都是公有的 6 { 7 Object data; 8 Node *prev; 9 Node *next; 10 11 Node(const Object & d = Object(),Node *p = NUll,Node *n = Null): 12 d... 阅读全文
posted @ 2012-09-18 20:01 xingoo 阅读(445) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <list>#include <string>#include <vector>#include <bitset>using namespace std;template <typename Container,typename Object>void change(Container & c,const Object & newValue)//改变新值{ typename Container::ierator itr = c.begin(); whi 阅读全文
posted @ 2012-09-18 18:57 xingoo 阅读(686) 评论(0) 推荐(0) 编辑