Nic*_*ite 2 c++ implicit
如果我有代码:
int f(int a) { return a; } double f(double g) { return g; } int main() { int which = f(1.0f); }
调用f的哪个重载,为什么?
Mar*_*som 8
返回类型根本不考虑过载,因此您将获得双重版本.
归档时间:
17 年,3 月 前
查看次数:
320 次
最近记录: