记录详情

Compile Error

/in/foo.cc: In member function 'void BigInt::multiplyByDigit(int)':
/in/foo.cc:23:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < digits.size(); ++i) {
                         ~~^~~~~~~~~~~~~~~
/in/foo.cc: In member function 'void BigInt::add(const BigInt&)':
/in/foo.cc:40:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             int sum = (i < digits.size() ? digits[i] : 0) +
                        ~~^~~~~~~~~~~~~~~
/in/foo.cc:41:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                       (i < other.digits.size() ? other.digits[i] : 0) + carry;
                        ~~^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc: In member function 'BigInt BigInt::powHelper(const BigInt&, int)':
/in/foo.cc:58:25: error: no match for 'operator*' (operand types are 'BigInt' and 'BigInt')
             return half * half;
                    ~~~~~^~~~~~
/in/foo.cc:61:25: error: no match for 'operator*' (operand types are 'const BigInt' and 'BigInt')
             return base * half * half;
                    ~~~~~^~~~~~

信息

递交者
类型
自测
题目
P1023 OO6-1 高精度整数类的乘法运算
语言
C++
递交时间
2024-05-01 12:48:56
评测时间
2024-05-01 12:48:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes