2013年1月19日
摘要: C/C++的多维数组是按行、连续存储的。任务:用类模板实现操作接口相同、按列存储的、任意元素类型的多维数组。#include <iostream>using namespace std;template<class T>class Array;template <class T>class ArrayTmp{ friend class Array <T>; T* tpBody; int iRows,iColumns,iCurrentRow; ArrayTmp(int iRsz, int iCsz) { tpBody=new T[iRsz*iCsz 阅读全文
posted @ 2013-01-19 17:52 Yogurshine 阅读(1755) 评论(0) 推荐(0) 编辑