文件名称:MyArray

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • [C/C++] [Windows] [Visual.Net] [源码]
  • 上传时间:
  • 2014-05-26
  • 文件大小:
  • 10.02mb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 周*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

动态数组及模板类



任务目标:

  学习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

.......\Debug

.......\.....\MyArray.exe

.......\.....\MyArray.ilk

.......\.....\MyArray.pdb

.......\ipch

.......\....\myarray-a48f0e70

.......\....\................\myarray-86c48431.ipch

.......\MyArray

.......\MyArray.sdf

.......\MyArray.sln

.......\MyArray.suo

.......\.......\Debug

.......\.......\.....\CL.read.1.tlog

.......\.......\.....\CL.write.1.tlog

.......\.......\.....\link-cvtres.read.1.tlog

.......\.......\.....\link-cvtres.write.1.tlog

.......\.......\.....\link.12744-cvtres.read.1.tlog

.......\.......\.....\link.12744-cvtres.write.1.tlog

.......\.......\.....\link.12744.read.1.tlog

.......\.......\.....\link.12744.write.1.tlog

.......\.......\.....\link.15624-cvtres.read.1.tlog

.......\.......\.....\link.15624-cvtres.write.1.tlog

.......\.......\.....\link.15624.read.1.tlog

.......\.......\.....\link.15624.write.1.tlog

.......\.......\.....\link.3024-cvtres.read.1.tlog

.......\.......\.....\link.3024-cvtres.write.1.tlog

.......\.......\.....\link.3024.read.1.tlog

.......\.......\.....\link.3024.write.1.tlog

.......\.......\.....\link.read.1.tlog

.......\.......\.....\link.write.1.tlog

.......\.......\.....\main.obj

.......\.......\.....\mt.read.1.tlog

.......\.......\.....\mt.write.1.tlog

.......\.......\.....\MyArray.exe

.......\.......\.....\MyArray.exe.embed.manifest

.......\.......\.....\MyArray.exe.embed.manifest.res

.......\.......\.....\MyArray.exe.intermediate.manifest

.......\.......\.....\MyArray.ilk

.......\.......\.....\MyArray.lastbuildstate

.......\.......\.....\MyArray.log

.......\.......\.....\MyArray.pdb

.......\.......\.....\MyArray.vcxprojResolveAssemblyReference.cache

.......\.......\.....\MyArray.write.1.tlog

.......\.......\.....\MyArray_manifest.rc

.......\.......\.....\rc.read.1.tlog

.......\.......\.....\rc.write.1.tlog

.......\.......\.....\vc100.idb

.......\.......\.....\vc100.pdb

.......\.......\ipch

.......\.......\....\myarray-2da9a39c

.......\.......\....\................\myarray-86c48431.ipch

.......\.......\main.cpp

.......\.......\MyArray

.......\.......\MyArray.h

.......\.......\MyArray.sdf

.......\.......\MyArray.sln

.......\.......\MyArray.suo

.......\.......\MyArray.vcxproj

.......\.......\MyArray.vcxproj.filters

.......\.......\MyArray.vcxproj.user

.......\.......\.......\Debug

.......\.......\.......\.....\CL.read.1.tlog

.......\.......\.......\.....\CL.write.1.tlog

.......\.......\.......\.....\link-cvtres.read.1.tlog

.......\.......\.......\.....\link-cvtres.write.1.tlog

.......\.......\.......\.....\link.12744-cvtres.read.1.tlog

.......\.......\.......\.....\link.12744-cvtres.write.1.tlog

.......\.......\.......\.....\link.12744.read.1.tlog

.......\.......\.......\.....\link.12744.write.1.tlog

.......\.......\.......\.....\link.15624-cvtres.read.1.tlog

.......\.......\.......\.....\link.15624-cvtres.write.1.tlog

.......\.......\.......\.....\link.15624.read.1.tlog

.......\.......\.......\.....\link.15624.write.1.tlog

.......\.......\.......\.....\link.3024-cvtres.read.1.tlog

.......\.......\.......\.....\link.3024-cvtres.write.1.tlog

.......\.......\.......\.....\link.3024.read.1.tlog

.......\.......\.......\.....\link.3024.write.1.tlog

.......\.......\.......\.....\link.read.1.tlog

.......\.......\.......\.....\link.write.1.tlog

.......\.......\.......\.....\main.obj

.......\.......\.......\.....\mt.read.1.tlog

.......\.......\.......\.....\mt.write.1.tlog

.......\.......\.......\.....\MyArray.exe.embed.manifest

.......\.......\.......\.....\MyArray.exe.embed.manifest.res

.......\.......\.......\.....\MyArray.exe.intermediate.manifest

.......\.......\.......\.....\MyArray.lastbuildstate

.......\.......\.......\.....\MyArray.log

.......\.......\.......\.....\MyArray.vcxprojResolveAssemblyReference.cache

.......\.......\.......\.....\MyArray.write.1.tlog

.......\.......\.......\.....\MyArray_manifest.rc

.......\.......\.......\.....\rc.read.1.tlog

.......\.......\.......\.....\rc.write.1.tlog

.......\.......\.......\.....\vc100.idb

.......\.......\.......\.....\vc100.pdb

.......\.......\.......\main.cpp

.......\.......\.......\MyArray.h

.......\.......\.

相关说明

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

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org