您当前的位置: 首页 >  c++

龚建波

暂无认证

  • 3浏览

    0关注

    313博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C++基础学习笔记:自定义数组模板类

龚建波 发布时间:2017-09-14 13:22:28 ,浏览量:3

//!时间:2017年9月12日(周二)下午
//!内容:数组模板类
/*
修改:2017年9月13上午
成员方法中delete未正确匹配
改进:2017年9月13晚上
数组总量改为固定
*/
#define _CRTDBG_MAP_ALLOC
#include 
#include 
#include "ArrayTemplate.h"
#include "Arr.h"
#include 
int main()
{
	using namespace std;
{
		clock_t one = clock();
		Arr testOne(1);
		for (int i = 0; i < 10000; i++)
		{
			testOne.Add(5, 1);
		}
		clock_t two = clock();
		Array testTwo(1);
		for (int i = 0; i < 10000; i++)
		{
			testTwo.Add(5, 1);
		}
		clock_t three = clock();
		cout             
关注
打赏
1655829268
查看更多评论
0.0588s