函数重载

1.相同的作用域

2.有默认参数时,要注意避免二义性问题

void func(int a, int b = 20)
{
}

void func(int a )
{
}

void test()
{
    func(20);    //error 不知道调用哪个
}
原文地址:https://www.cnblogs.com/yifengs/p/15136832.html