C++之缺省參數

//沒有傳參時,使用參數的默認值 //傳參時,使用指定的實參 #include using namespace std; //全缺省參數 void Test(int a = 10) { cout << a << endl; } void Test1(int a = 11, int b = 22, int c = 33) { cout << a << " " << b << " " << c <<
相關文章
相關標籤/搜索