摘要: #pragma once #define MAXSIZE 1000 #include<iostream> using namespace std; template<class DataType> class triple { public: int row, col; DataType e; }; 阅读全文
posted @ 2019-11-04 16:10 风间6324 阅读(477) 评论(0) 推荐(0) 编辑
摘要: int m[][4] = { {0,0,0,1}, {1,0,0,1}, {0,0,1,0} }; Mtriple<int> t(3, 4, (int*)m); 在传递任意行和列的二维数组时,可以采取在main函数中写成上述形式的方法 而头文件中写的函数要通过地址找到值 template<class 阅读全文
posted @ 2019-11-04 12:40 风间6324 阅读(219) 评论(0) 推荐(0) 编辑