?? p1-71.cpp
字號:
#include <iostream.h>
//參數(shù)帶有默認值的函數(shù)
disp(int x=1,int y=1,int z=1)
{
cout<<"參數(shù)1: "<<x<<endl;
cout<<"參數(shù)2: "<<y<<endl;
cout<<"參數(shù)3: "<<z<<endl;
cout<<"------------------"<<endl;
}
//main()函數(shù)中測試參數(shù)帶有默認值的函數(shù)disp()
void main()
{
disp();
disp(10);
disp(10,20);
disp(10,20,30);
int a=1,b=2,c=3;
disp(a,b,c);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -