这个类型转换为什么没有返回值类型 ,谢谢!
#include<iostream.h>class a
{
public:
operator double()const;
a();
int dz;
int mz;
};
a::a()
{
mz = 1;
dz = 2;
}
a::operator double()const
{
return mz * 1.0 / dz;
}
int main()
{
a zz;
double s = zz;
cout<<s<<endl;
return 0;
}