自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 删除元素(针对数组)

Error_code List::remove(int position,List_entry &x){ if(count==0) return underflow; if(position=count) return range_error; x=entry[position]; for(i=position;i entry[i]=entry[i+1]; coun

2013-09-26 20:38:58 465

原创 Exercises 4.3 E2

void stack::operator=(const Stack &original){Stack new_copy(original);Node*temp=top_node;top_node=new_copy.top_node;new_copy.top_node=temp;}

2013-09-12 19:35:04 381

原创 Exercises 4.2 E2 (a)

int Stack::size()const{Node*p=top_node;int count=0;while(p!=NULL) {p=p->next;count++; }return count;}

2013-09-12 19:29:05 385

原创 Exercises4.1 E2

数据库中的NULLNull在数据库中表示 不知道的数据,主要有3种意思:1)知道数据存在,但不知道具体值.2)不知道数据是否存在.3)数据不存在.(1)Node*p0=new Node('0');Node*p1=p0->next=new Node('1');               //p1->next默认为NULL(2)No

2013-09-05 20:22:35 391

原创 Exercises4.1 E1

2013-09-05 19:54:30 458

原创 c++程序中的重要问题通过编程来体现(未完待续)

1.重载代码:#includeusing namespace std;class time{    int hour,minute,second;public:    time(int h,int m,int s)    {        hour=h;minute=m;second=s;    }    void display()    {

2013-08-29 20:11:32 423

转载 Exercise 2.2 E2(b)

采用栈的方法,为下面的说明编写一个函数copy_stack:Error_code copy_stack(Stack &dest , Stack &source);前置条件:无。后置条件:Stack dest已经成为Stack source的一个完全副本,而source未被改变。如果检测到错误,则返回一个合适的代码,否则返回success。写出函数:使

2013-08-29 19:43:00 460

转载 Exercises 3.3 E7

E7    Rewrite the methods for queue processing from the text ,using a flag to indicate a full queue  instead of keeping a count of the entries in the queue The class definition for this Queue

2013-08-29 19:36:49 449

转载 开源(开放源码)

Open Source(即开放源代码)的定义由Bruce Perens(曾是Debian的创始人之一)定义如下:●自由再散布(Free Distribution):获得源代码的人可自由再将此源代码散布。●源代码(Source Code):程式的可执行档在散布时,必需随附完整源代码或是可让人方便的事后取得源代码。●衍生著作(Derived Works):让人可依此源代

2013-08-29 19:25:55 1398

原创 数据结构与程序设计第一章编程原则的总结

这章主要概括了编程的重要原则,尤其是申请大的软件项目(large projects),并且采用面向对象等方法探索有效的运算法则。在这些过程中,我们在程序设计和数据存储的方法中创立问题,并且评估C++语言的基本特征,通过使用C++语言编写源程序。

2013-08-20 21:00:01 476

空空如也

空空如也

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

TA关注的人

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