自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 好吧,上篇是是单向的这篇是双向的

template Error_code List :: remove( int position , List_entry &x){Node*prior,*current;if (count == 0) return fail ;if (position =count) return range_error ;if (position > 0) {prior= set

2013-09-25 20:13:30 446

原创 list 方法的实现

The constructor Listtemplate List :: List( ){count = 0;}cleartemplate voidList :: clear( ){count = 0;}emptytemplate boolList :: empty( ) const{return count }full

2013-09-25 19:57:23 471

原创 list remove 方法

template Error_code List :: remove( int position , List_entry &x){ if (count == 0) return underflow ; if (position =count) return range_error ; x = entry[position ]; count −−; while (po

2013-09-25 19:41:53 524

转载 C++指针

什么是指针?    其实指针就像是其它变量一样,所不同的是一般的变量包含的是实际的真实的数据,而指针是一个指示器,它告诉程序在内存的哪块区域可以找到数据。这是一个非常重要的概念,有很多程序和算法都是围绕指针而设计的,如链表。   指针的好处是什么:快效率,省资源。    开始学习    如何定义一个指针呢?就像你定义一个其它变量一样,只不过你要在指针名字前加上一个星号。我们

2013-09-10 21:17:39 315

原创 Exercises 4.1 E2

(a)Node *p0=new Node(‘0’);Node *p1=p0->next=new Node(‘1’);(b)Node *p0=new Node(‘0’);Node *p1=new Node(‘1’,p0);Node *p2=p1;(c)Node *p0=new Node(‘0’);Node *p1=p0->nex

2013-09-05 18:07:06 342

原创 exercises3.3

const int maxqueue = 10; class Queue{public:Queue( ) ;bool empty( ) const;Error_code serve( ) ;Error_code append(const Queue_entry &item) ;Error_code retrieve(Queue_entry &item) const;

2013-08-28 22:48:57 360

原创 exercises2.2

Error_code copy_stack(Stack &dest,Stack &source);{Erroe_code outcome=success;Stack a;Stack_entry item;while( outcome==success&&!source.empty())outcome=source.top(item);outcome=source.pop

2013-08-28 22:14:44 378

原创 编程原则

1.1             (介绍)程序设计员的成果所具有的功效就好比是用一张拼凑的被单作为从高楼跳下的人的安全网,网强人安全。1.2             (life游戏)一个类的方法是公用的。一个类的函数是私有的。1.3              (编程设计风格)   为了使程序完善地运行,最重要的是确切地知道每个类和变量代表什么以及每个函数做什么,吲此一般应该包

2013-08-24 13:48:14 384

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除