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

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

于 2022-01-28 发布 文件大小:1.47 kB
0 78
下载积分: 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 个回复

  • ALIENTEK MINISTM32 实验33 触控USB鼠标实验
    ALIENTEK MINISTM32 实验33 触控USB鼠标实验(ALIENTEK MINISTM32 experiment 33 touch USB mouse experiment)
    2019-05-18 13:33:19下载
    积分:1
  • tempuerature control
    说明:  基于pt100的温度控制,用到msp430f5529单片机(based on pt100 temperature control)
    2020-06-18 06:40:01下载
    积分:1
  • zhizaoye
    基于制造业的无线条码管理系统的设计与实现 无线条码管理系统的设计与实现(Based on the manufacturing of the wireless bar code management system design and Implementation)
    2011-12-04 21:34:50下载
    积分:1
  • svinet-master
    混合隶属度随机块模型,用于进行社区划分,检测重叠社区,节点分组等( Mixed-Membership Stochastic Block mold,which is a scalable approach to community detection that discovers overlapping communities in massive realworld networks.)
    2016-07-19 16:31:56下载
    积分:1
  • XC824M_SPWM
    XC824单片机的编程代码,英飞凌8位机系列,初始化代码的参考例程(the code for xc824 8 bit MCU)
    2018-08-22 10:35:13下载
    积分:1
  • 从零开始学VC系列教程完整版
    说明:  适合初学者,VC从零开始学习教程。讲解清晰,容易理解。(For beginners, VC learns from scratch.)
    2020-06-24 08:40:01下载
    积分:1
  • regEnv
    如果已知很多环境变量,每次换机器都是相同配置,环境变量配置窗口操作觉得麻烦,可以考虑这个直接注册。 只需要在reg.txt中按行写入:环境变量名=环境变量值(If many environment variables are known, each machine change is the same configuration, environment variables configuration window operation is troublesome, you can consider this direct registration. Just write in reg. TXT by line: environment variable name = environment variable value)
    2019-02-26 14:31:12下载
    积分:1
  • Flashburning
    flash烧写的相关软件及方法,主要用于ARM板与主机交叉编译。供大家使用(flash burning)
    2011-07-04 12:19:14下载
    积分:1
  • 资源MFC-DLL的制作[在DLL中封装MFC对话框]
    资源MFC DLL的制作,在DLL中封装MFC对话框。(The production of resource MFC DLL encapsulates MFC dialog box in DLL.)
    2020-06-24 07:20:02下载
    积分:1
  • 我用C#语言写的一个对COM端口读写的示例程序!希望对想从事串口编程的朋友,有所帮助。...
    我用C#语言写的一个对COM端口读写的示例程序!希望对想从事串口编程的朋友,有所帮助。-c# program for COM-port
    2022-01-30 23:57:43下载
    积分:1
  • 696518资源总数
  • 105918会员总数
  • 20今日下载