注意:
#include<iostream>
using namespace std;
void test01(int a, int b = 10,int c = 10)
{
cout << a + b + c << endl;
}
void test02(int a , int b,int c=10)
{
cout << a + b << endl;
}
int main()
{
test01(10);
test02(10,10);
system("pause");
return 0;
}
#include<iostream>
using namespace std;
void test01(int a, int b, int c);
void test01(int a=10, int b = 10,int c = 10)
{
cout << a + b + c << endl;
}
void test02(int a=10, int b=10, int c = 10);
void test02(int a , int b,int c)
{
cout << a + b+c << endl;
}
int main()
{
test01(10);
test02(10,10);
system("pause");
return 0;
}