F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_28046063_14103.cpp: In constructor 'BigInteger::BigInteger(int)':
0_0_28046063_14103.cpp:30:10: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
         p[0] = value % BASE;
          ^
0_0_28046063_14103.cpp:31:10: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
         p[1] = value / BASE;
          ^
0_0_28046063_14103.cpp:32:14: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
         if (p[1] == 0)
              ^
0_0_28046063_14103.cpp: In constructor 'BigInteger::BigInteger(std::string)':
0_0_28046063_14103.cpp:46:14: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
             p[i] = strToInt(pvalue, off - WIDTH, off);
              ^
0_0_28046063_14103.cpp:49:10: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
         p[length - 1] = strToInt(pvalue, 0, off);
          ^
0_0_28046063_14103.cpp: In member function 'BigInteger BigInteger::add(const BigInteger&)':
0_0_28046063_14103.cpp:66:24: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
             if (this->p[i] + b.p[i] + carry >= BASE) {
                        ^
0_0_28046063_14103.cpp:66:33: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
             if (this->p[i] + b.p[i] + carry >= BASE) {
                                 ^
0_0_28046063_14103.cpp:67:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (this->p[i] + b.p[i] + carry) % BASE;
                         ^
0_0_28046063_14103.cpp:67:46: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (this->p[i] + b.p[i] + carry) % BASE;
                                              ^
0_0_28046063_14103.cpp:67:55: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (this->p[i] + b.p[i] + carry) % BASE;
                                                       ^
0_0_28046063_14103.cpp:70:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = this->p[i] + b.p[i] + carry;
                         ^
0_0_28046063_14103.cpp:70:45: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = this->p[i] + b.p[i] + carry;
                                             ^
0_0_28046063_14103.cpp:70:54: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = this->p[i] + b.p[i] + carry;
                                                      ^
0_0_28046063_14103.cpp:76:24: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
             if (this->p[i] + carry >= BASE) {
                        ^
0_0_28046063_14103.cpp:77:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (this->p[i] + carry) % BASE;
                         ^
0_0_28046063_14103.cpp:77:46: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (this->p[i] + carry) % BASE;
                                              ^
0_0_28046063_14103.cpp:80:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = this->p[i] + carry;
                         ^
0_0_28046063_14103.cpp:80:45: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = this->p[i] + carry;
                                             ^
0_0_28046063_14103.cpp:87:20: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
             if (b.p[i] + carry >= BASE) {
                    ^
0_0_28046063_14103.cpp:88:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (b.p[i] + carry) % BASE;
                         ^
0_0_28046063_14103.cpp:88:42: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = (b.p[i] + carry) % BASE;
                                          ^
0_0_28046063_14103.cpp:91:25: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = b.p[i] + carry;
                         ^
0_0_28046063_14103.cpp:91:41: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
                 result.p[resLen++] = b.p[i] + carry;
                                         ^
0_0_28046063_14103.cpp:98:21: error: no match for 'operator[]' (operand types are 'std::shared_ptr<int []>' and 'int')
             result.p[resLen++] = 1;
                     ^
0_0_28046063_14103.cpp: In function 'std::ostream& operator<<(std::ostream&, const BigInteger&)':
0_0_28046063_14103.cpp:108:18: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
         os << b.p[top--];
                  ^
0_0_28046063_14103.cpp:111:31: error: no match for 'operator[]' (operand types are 'const std::shared_ptr<int []>' and 'int')
             os << intToStr(b.p[top], buf);
                               ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/shared_ptr.h:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/memory:82,
                 from 0_0_28046063_14103.cpp:9:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/shared_ptr_base.h: In instantiation of 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Tp1*) [with _Tp1 = int; _Tp = int []; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/shared_ptr.h:113:32:   required from 'std::shared_ptr<_Tp>::shared_ptr(_Tp1*) [with _Tp1 = int; _Tp = int []]'
0_0_28046063_14103.cpp:29:46:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/shared_ptr_base.h:871:39: error: cannot convert 'int*' to 'int (*)[]' in initialization
         : _M_ptr(__p), _M_refcount(__p)
                                       ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-30 16:05:46, Gzip enabled