C++ 函數(shù)重載例子
#include
int qq(int a,int b);
int qq(int k);
double qq(double x,double y);
void main()
{
int x,y,z;
double k,t;
cout<<"輸入數(shù)值 "<
cin>>x>>y>>z;
cout<<"輸入實數(shù) "<
cin>>k>>t;
cout<<"第一個函數(shù)值"<
cout<<"第二個函數(shù)值"<
cout<<"第三個函數(shù)值"<
}
int qq(int a,int b)
{
return a+b;
}
int qq(int k)
{
return k;
}
double qq(double x,double y)
{
return x*y;
}
關鍵詞:
C++函數(shù)重
相關推薦
-
-
-
-
-
-
xiaohua | 2002-08-16
-
-
-
評論