自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 Which function is called when use virtual function.

class b{public:  virtual void mf( int p ) ;} ;void b::mf( int p ){  cout        }class d : public b{public:  void mf( double p ) ;} ;void d::mf( doub...

2005-04-25 15:12:00

阅读数 726

评论数 0

原创 Which function is called?

class b{public:  virtual void mf( int p ) ;} ;void b::mf( int p ){  cout        }class d : public b{public:  void mf( double p ) ;} ;void d::mf( doub...

2005-04-25 15:02:00

阅读数 746

评论数 0

原创 Another form of default constructor

Define a book class:class book{public:  book( int newISBN = 0, string newName = "" ) ;// Other member functions...private:  int ISBN ;  str...

2005-04-07 20:09:00

阅读数 508

评论数 0

原创 Differenct between return by value and by reference

Consider the following code://==================================1    int max( int& n1, int& n2 )2    {3      if(n1>n2)4         return n1 ...

2005-04-03 15:40:00

阅读数 603

评论数 0

原创 A const object can only call const function

consider the following class//=========================================================class cal_date{  public:    bool is_leap_year( void ) const ; ...

2005-03-26 11:45:00

阅读数 651

评论数 0

原创 Access out of range

Suppose OneLineText is a stringDont forget to check the index or it could be out of range! Lenthg checking must performe at first rather than access ...

2004-11-13 11:02:00

阅读数 973

评论数 0

原创 Struct is the same as int and float

int:int Number=0;Number=InputNumber();=============================struct Date{  int Day;  int Month;  int Year;};struct Person{ struct Date DOB; cha...

2004-09-17 20:20:00

阅读数 492

评论数 0

原创 About "feof()"

看下面这个程序,怎么会输出两次呢?如果feof()没问题的话,请告诉我为什么?#includemain(){FILE *fp;int n=74,k;printf("/n");fp=fopen("joseph.b","wb+");fwrit...

2004-09-17 19:09:00

阅读数 861

评论数 1

原创 The meaning of p->Next==NULL

Assume a node p.p->Next means its an empty list or it is the end node. PS: In other words, an empty list is also another form of the end node.

2004-09-12 11:28:00

阅读数 606

评论数 0

原创 Operation PRI

While doing EX22PG199 in the book written by Paul.Kelly, I want to take out the value in an two dim array using the following code:fElementOfMatrixA=...

2004-09-10 17:12:00

阅读数 609

评论数 0

原创 Pass two dim array!

如何将二维数组作为函数的参数传递    作者: jatix    邮箱: jatix@163.com    QQ:   52287017声明:  如果你是得道的大侠,这篇文章可能浪费你的时间,如果你坚持要看,我当然感觉很高兴,但是希望你看完了别骂我!如果你发现我这篇文章有错误的话,你可以提出批评以...

2004-09-09 16:43:00

阅读数 744

评论数 0

原创 Print the macro number

#define NUMBER 10if you want to print the number 10 on the screen, the code is:     printf(“%d“,NUMBER); - END -

2004-08-23 22:59:00

阅读数 506

评论数 0

原创 No return value when using recrusion

The following code will pass the complie, but with wring message in Borland C++Builder 6.0:     [C++ Wring] EX14PG197.c(99): W8070 Function should re...

2004-08-23 22:32:00

阅读数 687

评论数 1

原创 Shall I keep the previous version?

     If I have found something wrong with my code, I try to modify it. After doing that, shall I keep the previous for refrence? If the answer is tru...

2004-08-23 08:19:00

阅读数 488

评论数 0

原创 The last Node of Link List

The Last node should pointer to itself, as following:     Node *z = new Node;     z->Next = z;That could display the records N rather than N+1.The...

2004-08-20 11:03:00

阅读数 528

评论数 0

原创 Something about float divide

The experession     fVolume = CalculateCylinderVolume(fRadius,fHeight) / 3;will be all right, while:     fVolume = (1/3) * CalculateCylinderVolume(fR...

2004-08-19 21:10:00

阅读数 495

评论数 0

原创 The Program Extention

Problem Description:                 A manufactured item can have one of the solid shapes cone,                cylinder or rectangle and can be made ...

2004-08-18 22:06:00

阅读数 444

评论数 0

原创 Grid Table Style Print

If you want print a report as following:Staff no.  Hours Worked  Pay rate  Gross paydddd       dd                     dd           ddThe code is:prin...

2004-08-10 21:33:00

阅读数 449

评论数 0

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