maintest.cpp
来自「使用c++实现矩阵的各种运算 」· C++ 代码 · 共 26 行
CPP
26 行
#include "Matrix.h"
#include <iostream>
using namespace std;
int main ()
{
int nrow,ncol ;
cout<<"input nrow,ncol"<<endl;
cin>>nrow>>ncol ;
Matrix ma(nrow,ncol) ;
//Matrix ma;
cout<<ma.getCol()<<" "<<ma.getRow()<<endl;
ma.InitializeMatrix();
cout<<ma <<endl ;
for(int i=0;i<ma.getRow() ;i++)
delete[] ma.Array[i];
delete[] ma.Array;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?