Possible compilation errors in C++ [closed]
In C++, what kind of compilation errors might I run into while using function overloading, and when might these occur?
This website has a couple listed, though I think your question will probably get closed as not a real question:
http://net.pku.edu.cn/~course/cs101/resource/CppHowToProgram/5e/html/ch06lev1sec17.html
Creating overloaded functions with identical parameter lists and different return types is a compilation error.
A function with default arguments omitted might be called identically to another overloaded function; this is a compilation error. For example, having in a program both a function that explicitly takes no arguments and a function of the same name that contains all default arguments results in a compilation error when an attempt is made to use that function name in a call passing no arguments. The compiler does not know which version of the function to choose.
精彩评论