;
然后 , 尝试从候选函数中查找目标函数 , 精确匹配 传入的实参 与 重载函数的参数列表 ;
第一步 , 先通过默认参数 , 查看是否能将 实参 与 形参 精确匹配上 , 如果匹配失败 , 继续执行第二步...如果只是定义 重载函数 和 默认参数函数 , 而不调用他们 , 编译是不会报错的 ;
代码示例 :
// 包含 C++ 头文件
#include "iostream"
// 使用 std 标准命名空间...1>D:\002_Project\006_Visual_Studio\HelloWorld\HelloWorld\hello_world.cpp(22,10): error C2668: “fun”:...对重载函数的调用不明确
1>D:\002_Project\006_Visual_Studio\HelloWorld\HelloWorld\hello_world.cpp(16,6): message...: 可能是“void fun(int,int)”
1>D:\002_Project\006_Visual_Studio\HelloWorld\HelloWorld\hello_world.cpp(11,6