double.h

来自「data structures, algorithms and Applicat」· C头文件 代码 · 共 26 行

H
26
字号

// file double.h
#ifndef Double_
#define Double_
#include <stdlib.h>
#include <iostream.h>
#include "dnode.h"
#include "xcept.h"

template<class T>
class Double {
   public:
      Double() {LeftEnd = RightEnd = 0;}; 
      ~Double(); 
      int Length() const; 
      bool Find(int k, T& x) const; 
      int Search(const T& x) const; 
      Double<T>& Delete(int k, T& x); 
      Double<T>& Insert(int k, const T& x); 
      void Output(ostream& out) const;
   private:
      DoubleNode<T> *LeftEnd, *RightEnd;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?