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

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

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

  • 图像锐化
    图像锐化(image sharpening)是补偿图像的轮廓,增强图像的边缘及灰度跳变的部分,使图像变得清晰,分为空域处理和频域处理两类。
    2022-07-20 07:43:24下载
    积分:1
  • program
    在matlab, 利用粒子群算法(PSO)实现函数极值优化(In matlab, using particle swarm optimization (PSO) to achieve function extreme optimization)
    2014-11-12 05:51:51下载
    积分:1
  • 学生出勤管理系统
    学生出勤管理系统 该系统要求建立一个简单的学生出勤管理系统,并具有排序、查找、计算、插入、计算、显示等功能。 (1)学生出勤信息包括:出勤信息记录了学生的缺课情况,它包括:缺课日期、第几节课、课程名称、学生姓名、缺课类型(迟到、早退、请假及旷课)等。 (2)需要实现的功能 1)使用文件保存学生出勤信息,程序运行时从文件读入数据,程序结束前将数据保存在文件中; 2)  请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2022-03-25 09:18:55下载
    积分:1
  • Rtp
    服务器端发送H264码流,客户端接受并解码与存为YUV文件.(H264,ffmpeg,Rtp,YUV等技术都包含在内)希望大家好好学习。我愿传播我的知识,促进社会发展 2012.9.7(Server sends H264 stream client to receive and decode YUV file saved as. (H264, ffmpeg, Rtp, YUV, and other technologies are included) and hope that we learn. I would like to spread my knowledge, promote social development 2012.9.7)
    2012-09-07 17:59:22下载
    积分:1
  • Cadence_Allegro16.5crack
    Cadence_Allegro16.5crack-修正破解方法(Cadence_Allegro16.5crack-corrected crack)
    2012-11-21 10:40:57下载
    积分:1
  • 8_7
    说明:  计算机算法试题库问题,用最大流实现,运行正确(Computer algorithms questions Treasury issues, with the realization of maximum flow, operating correctly)
    2008-12-07 14:43:16下载
    积分:1
  • MvcMusicStore-v3.0
    一个MVC3架构的网站,非常使用,有源码、CSS、数据库等等(A MVC3 web framework, very used, source, CSS, database, etc.)
    2013-07-09 09:53:05下载
    积分:1
  • 酒店管理系统 有添加删除 查找客房和用户的功能 数据库连接为SQL...
    酒店管理系统 有添加删除 查找客房和用户的功能 数据库连接为SQL-Hotel management system to add deleted users to find rooms and the function of database connections for SQL
    2022-04-26 22:05:32下载
    积分:1
  • jianpanyuled(verson2)
    51单片机的矩阵键盘的介绍,编程实现计算器功能并在led上显示(51 MCU matrix keyboard introduction, programming calculator functions and the led display)
    2009-12-02 15:11:04下载
    积分:1
  • OV7670
    对带FIFO的OV7670模块的驱动,显示设备为LCD。实测可用。(For the driver of the OV7670 module with FIFO, the display device is an LCD. Measured available.)
    2018-03-17 16:47:07下载
    积分:1
  • 696516资源总数
  • 106668会员总数
  • 21今日下载