最近在编写矩阵模板类的时候出现了这样的问题:
这是报错信息: 这是源代码:
// Math_mTool_classTemplate.hpp用于定义类模板
# include
# include
using namespace std;
#ifndef _MATH_MTOOL_CLASSTEMPLATE_HPP
#define _MATH_MTOOL_CLASSTEMPLATE_HPP
template
class Matrix{
private:
Numtype*** array_row; // 二维数组,该数组保存 数据对象的指针
int row; // 该矩阵的行数
int col; // 该矩阵的列数
public:
Matrix():array_row(NULL),row(0),col(0){}; // 无参数构造函数
Matrix(Numtype*** a,int r,int c); // 构造函数
Matrix(int r,int c); // 构造函数重载,创建 r*c 的矩阵(空的)
~Matrix(); // 析构函数申明
void pLTFir(int r1,int r2); // 第一类初等行变换(成员函数)
void pLTSec(int r,const Numtype& value); // 第二类初等行变化重载
void pLTThi(int r1,int r2,const Numtype& value); // 第三类初等行变换的函数重载
friend Matrix
friend Matrix
friend Matrix
friend Matrix
friend Matrix operator*(Matrix& m1,Numtype& f);
friend Matrix operator*(int value,Matrix& m2);
friend Matrix operator*(Matrix& m1,int value);
friend istream& operator>> <>(istream& input,Matrix
friend ostream& operator<< <>(ostream& output,const Matrix
// 注意插入和提取运算符返回值必须返回引用
};
#endif
希望大佬能帮忙指出错误,感谢!!



