Compile Error

foo.cc: In function 'void count(int, int)':
foo.cc:39:17: error: reference to 'plus' is ambiguous
   39 |                 plus(a,i);
      |                 ^~~~
In file included from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/string:48,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/bits/locale_classes.h:40,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:41,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/istream:38,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/sstream:38,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/complex:45,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/ccomplex:39,
                 from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:54,
                 from foo.cc:1:
/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/bits/stl_function.h:180:12: note: candidates are: 'template<class _Tp> struct std::plus'
  180 |     struct plus : public binary_function<_Tp, _Tp, _Tp>
      |            ^~~~
foo.cc:17:6: note:                 'void plus(int, int)'
   17 | void plus(int a,int b){
      |      ^~~~
foo.cc: In function 'void work()':
foo.cc:60:5: error: 'pcout' was not declared in this scope
   60 |     pcout<<tol<<n-tol;
      |     ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1731 A类B类
语言
C++
递交时间
2023-07-18 21:10:50
评测时间
2023-07-18 22:00:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes