datalist.cpp
资源名称:ds1-3.rar [点击查看]
上传用户:chaiyuqiu
上传日期:2022-08-03
资源大小:27k
文件大小:1k
源码类别:
数据结构
开发平台:
C/C++
- #ifndef DATALIST_H
- #define DATALIST_H
- #include <iostream.h>
- template < class Type >
- class dataList {
- private:
- Type * Element;
- int ArraySize;
- void Swap (const int mark1, const int mark2);
- int MaxKey (cocnst int low, const int high);
- public:
- dataList (int size = 10):ArraySize(size),Element(new Type[Size]) {}
- ~dataList () {delete[] Element; }
- void Sort ();
- friend ostream& operator << (ostream& outStream, const datalist<Type> & outList);
- friend istream& operator << (istream& inStream, const datalist<type> & inList);
- };
- #endif