CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程 其他小程序

文件名称:MyArray

介绍说明--下载内容来自于网络,使用问题请自行百度

动态数组及模板类



任务目标:

  学习C++的类机制、模板机制、运算符重载、重载函数机制、内存动态分配与释放等。

任务描述:

  使用C++的类机制实现一个动态的数组类MyArray,具有完整的构造和析构函数。使用模板机制,使其能够支持各种数据类型(包括结构体)。MyArray类中实现以下方法:

添加一个元素,使用函数重载的方式,实现1)添加数组尾部,2)添加到指定序号位置;

通过函数,设置指定位置(序号)的元素数据;

删除指定序号的元素;

删除所有元素;

获得元素个数

通过函数获取指定序号的元素;

重载运算符‘[]’,可以通过序号引用数组元素。

  实现以上功能的动态数组类,并设计测试代码,验证实现的所有功能。要求数组元素的数据类型为自定义的数据结构,如“学生信息”。

任务提示:

  添加元素时用new分配空间,删除时用delete删除空间-Dynamic arrays and template class mission objectives: learning class mechanism C++, the template mechanism, operator overloading, function overloading mechanism, such as dynamic memory allocation and deallocation. Task Descr iption: Use C++ class mechanism to implement a dynamic array class MyArray, with full constructor and destructor functions. Using the template mechanism to support a variety of data types (including structures). MyArray class implements the following methods: add an element, the use of function overloading way to achieve a) to add an array of tail, 2) to specify the ordinal position through the function, setting the specified location (number) of the element data delete the specified number of Elements delete all the elements obtain the number of elements specified number of elements to get through the function overloaded operator ' []' , array elements can be referenced by number. Achieve more dynamic array class functionality and design test code, verif
(系统自动生成,下载前可以参看下载内容)

下载文件列表

MyArray/
MyArray/Debug/
MyArray/Debug/MyArray.exe
MyArray/Debug/MyArray.ilk
MyArray/Debug/MyArray.pdb
MyArray/ipch/
MyArray/ipch/myarray-a48f0e70/
MyArray/ipch/myarray-a48f0e70/myarray-86c48431.ipch
MyArray/MyArray/
MyArray/MyArray.sdf
MyArray/MyArray.sln
MyArray/MyArray.suo
MyArray/MyArray/Debug/
MyArray/MyArray/Debug/cl.command.1.tlog
MyArray/MyArray/Debug/CL.read.1.tlog
MyArray/MyArray/Debug/CL.write.1.tlog
MyArray/MyArray/Debug/link-cvtres.read.1.tlog
MyArray/MyArray/Debug/link-cvtres.write.1.tlog
MyArray/MyArray/Debug/link.12744-cvtres.read.1.tlog
MyArray/MyArray/Debug/link.12744-cvtres.write.1.tlog
MyArray/MyArray/Debug/link.12744.read.1.tlog
MyArray/MyArray/Debug/link.12744.write.1.tlog
MyArray/MyArray/Debug/link.15624-cvtres.read.1.tlog
MyArray/MyArray/Debug/link.15624-cvtres.write.1.tlog
MyArray/MyArray/Debug/link.15624.read.1.tlog
MyArray/MyArray/Debug/link.15624.write.1.tlog
MyArray/MyArray/Debug/link.3024-cvtres.read.1.tlog
MyArray/MyArray/Debug/link.3024-cvtres.write.1.tlog
MyArray/MyArray/Debug/link.3024.read.1.tlog
MyArray/MyArray/Debug/link.3024.write.1.tlog
MyArray/MyArray/Debug/link.command.1.tlog
MyArray/MyArray/Debug/link.read.1.tlog
MyArray/MyArray/Debug/link.write.1.tlog
MyArray/MyArray/Debug/main.obj
MyArray/MyArray/Debug/mt.command.1.tlog
MyArray/MyArray/Debug/mt.read.1.tlog
MyArray/MyArray/Debug/mt.write.1.tlog
MyArray/MyArray/Debug/MyArray.exe
MyArray/MyArray/Debug/MyArray.exe.embed.manifest
MyArray/MyArray/Debug/MyArray.exe.embed.manifest.res
MyArray/MyArray/Debug/MyArray.exe.intermediate.manifest
MyArray/MyArray/Debug/MyArray.ilk
MyArray/MyArray/Debug/MyArray.lastbuildstate
MyArray/MyArray/Debug/MyArray.log
MyArray/MyArray/Debug/MyArray.pdb
MyArray/MyArray/Debug/MyArray.vcxprojResolveAssemblyReference.cache
MyArray/MyArray/Debug/MyArray.write.1.tlog
MyArray/MyArray/Debug/MyArray_manifest.rc
MyArray/MyArray/Debug/rc.command.1.tlog
MyArray/MyArray/Debug/rc.read.1.tlog
MyArray/MyArray/Debug/rc.write.1.tlog
MyArray/MyArray/Debug/vc100.idb
MyArray/MyArray/Debug/vc100.pdb
MyArray/MyArray/ipch/
MyArray/MyArray/ipch/myarray-2da9a39c/
MyArray/MyArray/ipch/myarray-2da9a39c/myarray-86c48431.ipch
MyArray/MyArray/main.cpp
MyArray/MyArray/MyArray/
MyArray/MyArray/MyArray.h
MyArray/MyArray/MyArray.sdf
MyArray/MyArray/MyArray.sln
MyArray/MyArray/MyArray.suo
MyArray/MyArray/MyArray.vcxproj
MyArray/MyArray/MyArray.vcxproj.filters
MyArray/MyArray/MyArray.vcxproj.user
MyArray/MyArray/MyArray/Debug/
MyArray/MyArray/MyArray/Debug/cl.command.1.tlog
MyArray/MyArray/MyArray/Debug/CL.read.1.tlog
MyArray/MyArray/MyArray/Debug/CL.write.1.tlog
MyArray/MyArray/MyArray/Debug/link-cvtres.read.1.tlog
MyArray/MyArray/MyArray/Debug/link-cvtres.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.12744-cvtres.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.12744-cvtres.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.12744.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.12744.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.15624-cvtres.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.15624-cvtres.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.15624.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.15624.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.3024-cvtres.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.3024-cvtres.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.3024.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.3024.write.1.tlog
MyArray/MyArray/MyArray/Debug/link.command.1.tlog
MyArray/MyArray/MyArray/Debug/link.read.1.tlog
MyArray/MyArray/MyArray/Debug/link.write.1.tlog
MyArray/MyArray/MyArray/Debug/main.obj
MyArray/MyArray/MyArray/Debug/mt.command.1.tlog
MyArray/MyArray/MyArray/Debug/mt.read.1.tlog
MyArray/MyArray/MyArray/Debug/mt.write.1.tlog
MyArray/MyArray/MyArray/Debug/MyArray.exe.embed.manifest
MyArray/MyArray/MyArray/Debug/MyArray.exe.embed.manifest.res
MyArray/MyArray/MyArray/Debug/MyArray.exe.intermediate.manifest
MyArray/MyArray/MyArray/Debug/MyArray.lastbuildstate
MyArray/MyArray/MyArray/Debug/MyArray.log
MyArray/MyArray/MyArray/Debug/MyArray.vcxprojResolveAssemblyReference.cache
MyArray/MyArray/MyArray/Debug/MyArray.write.1.tlog
MyArray/MyArray/MyArray/Debug/MyArray_manifest.rc
MyArray/MyArray/MyArray/Debug/rc.command.1.tlog
MyArray/MyArray/MyArray/Debug/rc.read.1.tlog
MyArray/MyArray/MyArray/Debug/rc.write.1.tlog
MyArray/MyArray/MyArray/Debug/vc100.idb
MyArray/MyArray/MyArray/Debug/vc100.pdb
MyArray/MyArray/MyArray/main.cpp
MyArray/MyArray/MyArray/MyArray.h
MyArray/MyArray/MyArray/MyArray.vcxproj
MyArray/MyArray/MyArray/MyArray.vcxproj.filters
MyArray/MyArray/MyArray/MyArray.vcxproj.user

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com