请大家帮我看看这个程序
#include<iostream.h>
void function(double y,double (*f)(double))
{
cout<<(*f)(y)<<endl;
}
int main(int argc,char * argv[])
{
double sin(double),cos(double),tan(double);
int angle;
cout<<"Please input a angle: "<<endl;
cin>>angle;
double pi=3.1416;
double x=pi/180*angle;
cout<<"sin("<<angle<<")="<<endl;
function(x,sin);
cout<<"cos("<<angle<<")="<<endl;
function(x,cos);
cout<<"tan("<<angle<<")="<<endl;
function(x,tan);
getchar();
return 0;
}
编译和运行时都没错误,但是看不到结果,Object Inspector那个只是闪一下就没反映了,还有几个程序也遇到了这个问题,是我的环境没装好还是怎么回事啊?我是一个新手,请各位大侠指教!