您的位置:首页 > 编程语言 > C语言/C++

[zz]C++中的函数重载

2013-11-27 22:12 316 查看
In C++, following function declarations cannot be overloaded.

1) Function declarations that differ only in the return type.

函数声明仅返回值类型不同

2) Member function declarations with the same name and the name parameter-type-list cannot be overloaded if any of them is a static member function declaration.

3) Parameter declarations that differ only in a pointer * versus an array [] are equivalent.

4) Parameter declarations that differ only in that one is a function type and the other is a pointer to the same function type are equivalent.

5) Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent.

6) Two parameter declarations that differ only in their default arguments are equivalent.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: