这段程序隐含什么错误
根据运行时结构分析
#include <iostream.h>
float& fn(float r)
{
float a;
a = (float)(r*r*3.14);
return a;
}
void main()
{
float b = fn(5.0);
float& d = fn(5.0);
cout << b << endl;
cout << d << endl;
}
发布时间: 2013-11-19 22:55:29 作者: rapoo
这段程序隐含什么错误
根据运行时结构分析
#include <iostream.h>
float& fn(float r)
{
float a;
a = (float)(r*r*3.14);
return a;
}
void main()
{
float b = fn(5.0);
float& d = fn(5.0);
cout << b << endl;
cout << d << endl;
}