登录
首页 » c++ » 动态数组模板类的C++实现

动态数组模板类的C++实现

于 2022-01-28 发布 文件大小:1.47 kB
0 114
下载积分: 2 下载次数: 1

代码说明:

动态数组模板类的C++实现#ifndef ARRAY_CLASS#define ARRAY_CLASS#include #include using namespace std;#ifndef NULLconst int NULL = 0;#endif//错误类型集合, 共三种,数组大小错误,内存分配错误和下标越界enum ErrorType {invalidArraySize, memoryAllocationError, indexOutOfRange};//错误信息char *errorMsg[] = {"Invalid array size", "Memery allocation error", "Index out of range"};//数组类模板声明templateclass Array{    public:        Array(int sz = 50);        Array(const Array &A);        ~Array(void);        Array& operator = (const Array &rhs);     //重载=,使数组对象可以整体赋值        T& operator[](int n);            

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C-language-comprehensive-training
    C语言综合训练,包含文件调用、添加还有一些汇总统计等(C language integrated training, including file calls, add some summary statistics)
    2014-01-02 15:42:40下载
    积分:1
  • opengl非常好用的一个库opengl非常好用的一个库
    opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库opengl非常好用的一个库
    2022-02-22 03:23:27下载
    积分:1
  • ov5640-camera-module
    ov5640 DVP 接口的详细使用文档,包含各部分功能的示例代码(ov5640 camera module)
    2014-02-17 15:23:55下载
    积分:1
  • radixsort
    对首先产生20个随机数进行基数排序,是利用C++实现的(On the first 20 random numbers generated for the base sequencing is the use of C++ Realize the)
    2007-10-16 19:11:53下载
    积分:1
  • SHIYANJIU
    基于51的C语言频率计,内涵仿真图,以实现空能(Based on 51 C-language frequency meter, meaning simulation diagram, in order to achieve air can)
    2013-07-17 14:12:29下载
    积分:1
  • Arduino DUE输出VGA
    资源描述用Arduino输出VGA信号,能够很方便的输出到任何屏幕上,只要它支持VGA接口即可,从一个外国网站拿过来的,是我的一个项目里面的,因为要用到7英寸的屏幕,所以选择输出VGA
    2022-08-16 23:00:05下载
    积分:1
  • STM32 GPRS 透传源代码
    GPRS  透传数据源代码 使用IAR编译工具 STM32 MCU
    2023-07-06 18:10:04下载
    积分:1
  • han1
    这里我们针对三级固体火箭进行研究,主要考虑每一级发动机工作时推力 和比冲 与发动机试车存在摄动偏差(相差 )时所产生火箭关机点时刻的状态偏差。火箭的飞行的动力学方程可建立在地面发射坐标系中,火箭的第一级、第二级和第三级按照固定的俯仰角程序飞行,第二、三级飞行时已在大气层外,此时可忽略气动力的影响。(Here we study for three solid rocket, the main consideration at every level when the engine thrust and state arising the moment the rocket off point perturbation deviation (difference) in the presence of specific impulse and engine test bias. Outside of the rocket flight dynamics equations can be established on the ground coordinate system launch, the rocket s first stage, the second and third stages according to a fixed elevation angle of flight procedures, and the second, when the third flight already in the atmosphere, this when can ignore the effects of gas dynamics.)
    2020-11-03 20:39:53下载
    积分:1
  • 输油管道问题--修建一个东西方向管道使得各个油井到管道距离之和最短
    用c++6.0实现的关于输油管道问题解决。其中采用了冒泡排序的方法,只需要找到n个油井的中位数即可,然后再中位数附近进行建立管道,管道已经规定东西方向。
    2022-05-09 03:41:24下载
    积分:1
  • 该源码在C#环境下对开发windows ce对数据库的操作语句数据库为sql server ce2.0与sql server 2000的数据复制合并...
    该源码在C#环境下对开发windows ce对数据库的操作语句数据库为sql server ce2.0与sql server 2000的数据复制合并-source in the C# development environment for windows ce operation of the database sql statement to the database server ce2.0 sql server 2000 with the merger of data replication
    2023-05-24 07:55:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载