记录详情

Compile Error

foo.cc: In member function ‘BigNumber& BigNumber::operator-=(const BigNumber&)’:
foo.cc:98:48: error: no matching function for call to ‘std::exception::exception(const char [6])’
   98 |                         throw exception("minus");
      |                                                ^
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/new:41,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_tempbuf.h:59,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:69,
                 from /nix/gcc-13.2.0/include/c++/13.2.0/algorithm:61,
                 from stdc++.h:51:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:67:5: note: candidate: ‘constexpr std::exception::exception(std::exception&&)’
   67 |     exception(exception&&) = default;
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:67:15: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘std::exception&&’
   67 |     exception(exception&&) = default;
      |               ^~~~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:65:5: note: candidate: ‘constexpr std::exception::exception(const std::exception&)’
   65 |     exception(const exception&) = default;
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:65:15: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘const std::exception&’
   65 |     exception(const exception&) = default;
      |               ^~~~~~~~~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:62:5: note: candidate: ‘std::exception::exception()’
   62 |     exception() _GLIBCXX_NOTHROW { }
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:62:5: note:   candidate expects 0 arguments, 1 provided
foo.cc:113:48: error: no matching function for call to ‘std::exception::exception(const char [6])’
  113 |                         throw exception("minus");
      |                                                ^
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:67:5: note: candidate: ‘constexpr std::exception::exception(std::exception&&)’
   67 |     exception(exception&&) = default;
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:67:15: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘std::exception&&’
   67 |     exception(exception&&) = default;
      |               ^~~~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:65:5: note: candidate: ‘constexpr std::exception::exception(const std::exception&)’
   65 |     exception(const exception&) = default;
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:65:15: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘const std::exception&’
   65 |     exception(const exception&) = default;
      |               ^~~~~~~~~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:62:5: note: candidate: ‘std::exception::exception()’
   62 |     exception() _GLIBCXX_NOTHROW { }
      |     ^~~~~~~~~
/nix/gcc-13.2.0/include/c++/13.2.0/bits/exception.h:62:5: note:   candidate expects 0 arguments, 1 provided
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
P1035 A11-2 K进制的高精度整数
语言
C++
递交时间
2024-03-26 13:28:22
评测时间
2024-03-26 13:28:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes