记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:40:9: error: reference to 'plus' is ambiguous
   cout<<plus(num1,num2)<<endl;
         ^~~~
/in/foo.cc:4:8: note: candidates are: std::__cxx11::string plus(std::__cxx11::string, std::__cxx11::string)
 string plus(string num1,string num2){
        ^~~~
In file included from /usr/include/c++/6/string:48:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_function.h:167:12: note:                 template<class _Tp> struct std::plus
     struct plus : public binary_function<_Tp, _Tp, _Tp>
            ^~~~

信息

递交者
类型
递交
题目
P1187 汇编你好
比赛
2020年互联网创新创业科技节程序设计大赛
语言
C++
递交时间
2020-12-09 15:10:01
评测时间
2020-12-09 15:10:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes