void Initial(Matrix A)
{
int i,j;
for(i=0;i>A.M[i][j];
}
这是我的赋值函数,在类中已经设为友元函数,可是却无法赋值??看看好吗?谢谢!!!!
class Matrix
{
private:
int line,row;
int **M;
public:
Matrix(int l=4,int r=5)
{
line=l;
row=r;
M=new int*[4];
for(int i=0;i<l;i++)
M[i]=new int[5];
}
}
这是我定义的矩阵类,我想知道怎么给M赋值