[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.
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.
相关文章推荐
- 第八章 C++函数的高级特性(8.2 成员函数的重载、覆盖与隐藏)
- C++ 类的多态二(函数重载--函数重写--函数重定义)
- 浅谈 C++中成员函数的重载、覆盖和隐藏
- c++成员函数的重载、覆盖、隐藏区别
- C++默认参数与函数重载
- C++第12周mooc在线测评—第12周 统一接口不同实现-多态性(虚函数与符号重载)
- c++与java中函数重载区别与相同点
- C++基础知识复习--运算符重载(非成员函数重载和成员函数重载)
- C++学习笔记22,普通函数重载(1)
- c++ 函数重载
- C++的函数的重载
- C++函数重写、重载 小结
- C++中函数指针遇上函数重载
- C++函数重载过程中的二义性和类型转换
- C++ 函数调用运算符 () 重载
- C++之函数重载
- STL运用的C++技术(4)---函数重载
- [c++]继承覆盖与函数重载
- C++默认参数与函数重载 注意事项
- C/C++中的函数参数传递机制(zz)