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

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

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

  • gBoolean
    本实验主要利用OpenGL完成两个物体的加(或)、减(和)运算。利用二次曲面完成球、圆盘和圆锥的绘制。通过模板测试和深度测试来完成两个物体的加(或)、减(和)运算。设置菜单,并把右键和菜单相关联,来选择所要进行的操作。 (This experiment mainly use OpenGL to complete two objects and (or), minus (and) operation.By using quadric surface finish ball, cone and the drawing of the disc.Through templates and depth testing to complete two objects and (or), minus (and) operation.Settings menu, and the right associated with the menu, to choose to do.)
    2015-11-11 23:28:54下载
    积分:1
  • 2013高仿QQ
    华夏联盟高仿QQ带源码 软件大小: 70 kB 软件语言: 简体中文 软件性质: 国产软件 软件授权: 免费软件 更新时间: 2013-6-16 应用平台: Win7/Vista/Win2003/WinXP
    2013-06-16下载
    积分:1
  • C#换肤实例
    采用了多个皮肤库,来实现点击按钮更换C#对话框窗体皮肤。
    2022-03-23 23:58:49下载
    积分:1
  • shuicao2D
    边界造波法udf,可应用于fluent软件2D水槽的波浪生成。(Boundary wave method udf, the software can be applied to 2D sink fluent waves generated.)
    2014-12-07 17:42:30下载
    积分:1
  • httpclient
    说明:  输入参数:某个web地址,端口号(默认80)。 连接成功后,提示,输入:某个文件名。例如index.jsp 获取文件成功后,输出发送的字节数和接收到的字节数。关闭(Input parameters: a web address, port number (default 80). Connection is successful, prompt, type: a file name. For example, access to the file index.jsp is successful, the output number of bytes sent and received bytes. Close)
    2010-03-17 23:42:01下载
    积分:1
  • paly
    摇摇棒的程序。。。很好用可以显示很图形文字,也可以自己写编码,显示自己想要的东西(Shook his stick procedures. . . Graphics can be displayed very well with the text, you can write your own code to show what she wants)
    2011-11-15 17:13:25下载
    积分:1
  • Server_TCP
    说明:  一个TCP和UPD聊天、传收文件程序,该程序为服务器版,另外还有客户端版(a TCP and UPD chatting, communicating documents procedures, the procedures for the server version, as well as the client version)
    2005-12-28 18:06:46下载
    积分:1
  • RandomName
    MFC实现的从TXT文件中随机抽取一个人姓名(MFC to achieve a random sample a TXT file name)
    2020-12-02 10:29:25下载
    积分:1
  • C_PL0
    用C语言实现的PL0的源代码,并进行了扩展,包括文档,有助于学编译(Achieved with C language source code PL0 and expanded, including documentation, help to learn to compile)
    2007-09-28 12:27:56下载
    积分:1
  • ses
    有限差分波动方程不加边界条件二阶正演时间切片程序。(Finite difference wave equation without boundary conditions of second-order forward time-slicing procedure.)
    2009-12-11 16:54:20下载
    积分:1
  • 696518资源总数
  • 106208会员总数
  • 21今日下载