?? ch9_6.cpp
字號:
//*********************
//** ch9_6.cpp **
//*********************
#include <iostream.h>
float temp;
float fn1(float r)
{
temp = r*r*3.14;
return temp;
}
float& fn2(float r)
{
temp = r*r*3.14;
return temp;
}
void main()
{
float a=fn1(5.0); //1
float& b=fn1(5.0); //2:warning
float c=fn2(5.0); //3
float& d=fn2(5.0); //4
cout<<a<<endl;
cout<<b<<endl;
cout<<c<<endl;
cout<<d<<endl;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -