std::min 3个参数 却提供两个

来源:互联网 发布:中国市场数据研究院 编辑:程序博客网 时间:2024/06/18 17:04

 

error C2780: “const _Ty &std::min(const _Ty &,const _Ty &,_Pr)” : 应输入 3 个参数,却提供了 2 个
        /include/xutility(1265) : 参见“std::min”的声明
error C2782: “const _Ty &std::min(const _Ty &,const _Ty &)” : 模板参数“_Ty”不明确
        /include/xutility(1257) : 参见“std::min”的声明

 

原因: std::min(a, b) 其中 a 和 b 的变量类型不相同。

原创粉丝点击