请教c++ 矩阵运算问题
问题在程序后面的注释里啊
// 类面向对象.cpp : Defines the entry point for the console application.
//
#include <iostream>
using namespace std;
#include "class.h"
int main(int argc, char* argv[])
{
char choice;
cout<<endl;
cout<<endl;
cout<<" A Calculator Of matrix "<<endl;
cout<<" made by zzy in 2007.4.25"<<endl;
cout<<endl;
cout<<"0:exit."<<endl; //退出
cout<<"1:addition."<<endl; //加法
cout<<"2:subtration."<<endl; //减法
cout<<"3:multiplication."<<endl; //乘法
cout<<endl;
cout<<"please input your choice:"<<endl;
cin>>choice;
Cmatrix mymatrix1,mymatrix2,mymatrix3;
mymatrix1.getnumber();
mymatrix2.getnumber();
states flag;
//用switch判断参与什么运算
switch(choice)
{
case '0':
exit( 0 );
break;
case '1':
flag=mymatrix1.add(mymatrix2,mymatrix3);
if(flag==noerror)
{
mymatrix3.shownumber();
}
else
{
cout<<"error in addition"<<endl;
}
break;
case '2':
flag=mymatrix1.sub(mymatrix2,mymatrix3);
if(flag==noerror)
{
mymatrix3.shownumber();
}
else
{
cout<<"error in subtration"<<endl;
}
break;
case '3':
flag=mymatrix1.mul(mymatrix2,mymatrix3);
if(flag==noerror)
{
mymatrix3.shownumber();
}
else
{
cout<<"error in multiplication"<<endl;
}
break;
default:
cout<<endl;
cout<<"wrong choice."<<endl;
break;
}
return 0;
}
/*其实只要有输入,那isemtpy()就没有什么作用啊
因为其必定不为NULL啊 */