#include<iostream.h>
double&function(double &variable)
{
return variable;
}
void main()
{
double a=10;
double *p=&a;
double *q=&function();//定义指针q指向函数functions
cout<<function(a)<<endl;
function(a)=5;
cout<<a<<'\t'<<function(a)<<endl;
cout<<p<<'\t'<<q<<endl;
}
这样为什么不可以,应该怎么办呢?