代码有4个错误,请大家指点
#include <iostream.h>
void add(double x,double y)
{
cout<<x<<"+"<<y<<"="<<x+y<<"\n";
}
void sub(double x,double y)
{
cout<<x<<"-"<<y<<"="<<x-y<<"\n";
}
void mul(double x,double y)
{
cout<<x<<"-"<<y<<"="<<x-y<<"\n";
}
void (*func[3])(double,double)={add,sub,mul};
void main()
{
double x=3,y=7;
char op;
do
{
cout <<"+---\n"
<<"- ---\n"
<<"*----\n"
<<"0----\n"
cin>>op;//这个句子没看明白,被提示语法错误,请大家指点
switch(op)
{
case'+':func[0](x,y);break;
case'-':func[1](x,y);break;
case'*':func[2](x,y);break;
case'0':return;
}
}while(1)
}